{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "A60AAE52CD7E4BF591B6E501B6B9F1BA",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "# <center> Lecture12 : Logistic Regression </center>  \n",
    " \n",
    "## <center> Instructor: Dr. Hu Chuan-Peng </center> "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "5279ECA916734B3797FA217D38B39FFB",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 回顾：贝叶斯视角下的回归模型  \n",
    "\n",
    "在贝叶斯统计框架下，回归模型的构建与检验方法与传统频率学派有所不同。  \n",
    "* 在贝叶斯回归中，模型的参数被视为随机变量，通过数据来更新其概率分布。  \n",
    "* 贝叶斯方法通过对参数的**后验分布**进行推断，从而评估模型的适应性与显著性。  \n",
    "* 这种方法使得我们不仅能得到参数的点估计，还能获得关于这些参数的不确定性的信息。  \n",
    "\n",
    "在之前的课件中，我们以自我优势匹配范式为例，建立了一个简单的线性回归模型：  \n",
    "\n",
    "$$  \n",
    "RT_{sec} \\sim \\mathcal{N}(\\beta_0 + \\beta_1 \\cdot Label, \\sigma^2)  \n",
    "$$  \n",
    "\n",
    "在这个模型中，反应时间（$RT_{sec}$）是一个连续的因变量。  \n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "EFB0C313FF314B24A15516A6B9911BE9",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "\n",
    "🤔 然而，在许多心理学研究中，另一个常见的因变量是反应是否正确，这通常是一个二分变量（正确/错误）。  \n",
    "\n",
    "当因变量是二分变量时，传统的线性回归模型就不再适用。 在这种情况下，大家可能会想到使用**逻辑回归**（Logistic Regression）模型来探讨因变量为二分变量的情况。  \n",
    "\n",
    "那么，在贝叶斯框架下，我们应该如何构建和处理逻辑回归（Logistic Regression）模型呢？  \n",
    "\n",
    "\n",
    "![Image Name](https://cdn.kesci.com/upload/image/rkz1ehen1l.png?imageView2/0/w/720/h/960)  \n",
    "\n",
    "<div style=\"padding-bottom: 30px;\"></div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "CFB039C3C2824BE7A0C08507BD8BB3C7",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 以随机点运动任务为例：贝叶斯逻辑回归  \n",
    "\n",
    "接下来，我们以之前介绍过的**随机点运动任务**（Random Motion Dot Task）为例，来理解贝叶斯逻辑回归模型的应用。  \n",
    "\n",
    "* 在这个实验中，参与者观察屏幕上随机运动的点，这些点的运动方向具有一定的一致性（即大部分点朝某一方向移动）。  \n",
    "* 参与者的任务是判断这些点的主要移动方向（例如，向左还是向右）。  \n",
    "\n",
    "实验的设计可以控制点的运动一致性（如10%或40%），从而影响参与者作出正确决策的难度。  \n",
    "\n",
    "<center>  \n",
    "    <table>  \n",
    "            <tr>  \n",
    "                <td><img src=\"https://cdn.kesci.com/upload/sjwnyi477j.gif?imageView2/0/w/400/h/400\" alt=\"\"></td>  \n",
    "                <td><img src=\"https://cdn.kesci.com/upload/sjwnyt1yq4.gif?imageView2/0/w/400/h/400\" alt=\"\"></td>  \n",
    "            </tr>  \n",
    "            <tr>  \n",
    "                <td>一致性10%</td>  \n",
    "                <td>一致性40%</td>  \n",
    "            </tr>  \n",
    "    </table>  \n",
    "</center>  \n",
    "\n",
    "**和之前的内容不同，本次课我们将研究点的运动一致性与判断是否正确之间的关系**：  \n",
    "\n",
    "1. **自变量：** 点的运动一致性（10% 一致性 与 40% 一致性）；  \n",
    "2. **因变量：** 判断是否正确（即被试是否准确判断了点的主要运动方向，1代表反应正确，0代表反应错误）。  \n",
    "\n",
    "<div style=\"padding-bottom: 30px;\"></div>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "86B8232821CE4BC3A24C40787D3939DB",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "以Evans et al.（2020, Exp. 1） 的数据为例进行探索。  \n",
    "\n",
    "> Evans, N. J., Hawkins, G. E., & Brown, S. D. (2020). The role of passing time in decision-making. Journal of Experimental Psychology: Learning, Memory, and Cognition, 46(2), 316–326. https://doi.org/10.1037/xlm0000725  \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false,
    "id": "943494B806404AB5B24DD38113AC17DB",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "# 导入 pymc 模型包，和 arviz 等分析工具 \n",
    "import pymc as pm\n",
    "import arviz as az\n",
    "import seaborn as sns\n",
    "import scipy.stats as st\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import xarray as xr\n",
    "import pandas as pd\n",
    "import ipywidgets\n",
    "\n",
    "# 忽略不必要的警告\n",
    "import warnings\n",
    "warnings.filterwarnings(\"ignore\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false,
    "id": "22D056EF4FD04F9B8F5047178E040495",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>subject</th>\n",
       "      <th>percentCoherence</th>\n",
       "      <th>correct</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>31727</td>\n",
       "      <td>40</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>31727</td>\n",
       "      <td>40</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1095</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1097</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1098</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1099</th>\n",
       "      <td>31727</td>\n",
       "      <td>40</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1105</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>543 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      subject  percentCoherence  correct\n",
       "0       31727                10        1\n",
       "1       31727                40        0\n",
       "3       31727                40        1\n",
       "6       31727                10        1\n",
       "7       31727                10        1\n",
       "...       ...               ...      ...\n",
       "1095    31727                10        1\n",
       "1097    31727                10        1\n",
       "1098    31727                10        1\n",
       "1099    31727                40        1\n",
       "1105    31727                10        0\n",
       "\n",
       "[543 rows x 3 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用 pandas 导入示例数据\n",
    "try:\n",
    "  df = pd.read_csv(\"/home/mw/input/bayes3797/evans2020JExpPsycholLearn_exp1_full_data.csv\") \n",
    "except:\n",
    "  df = pd.read_csv('data/evans2020JExpPsycholLearn_exp1_full_data.csv')\n",
    "\n",
    "# 筛选编号为 31727 的数据，并且筛选出两个不同的 percentCoherence\n",
    "df_clean = df[(df['subject'] == 31727) & (df['percentCoherence'].isin([10, 40]))]\n",
    "df_clean  = df_clean[[\"subject\", \"percentCoherence\", \"correct\"]]\n",
    "\n",
    "df_clean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false,
    "id": "1533D64DCA2C4404A4B76818AB318884",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "percentCoherence\n",
       "10    0.686047\n",
       "40    0.926316\n",
       "Name: correct, dtype: float64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_clean.groupby(\"percentCoherence\").correct.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false,
    "id": "1D67A9D62BD44CC397304DCA89F105B0",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAG0CAYAAADO5AZFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAnaElEQVR4nO3de1TUdf7H8dfIZbgoeCtEFwFX3WjJVEhXkHWzxMzTb9f6rf5yNy21k5uFaBtJWquuG+qmP9taLTfRas2stE67sSZdvKRbK4RUQmpogQmyaoGXAoXP749+zjaBhsPE4Mfn4xzOaT7z/c68xxx69p3vzDiMMUYAAACWaOPrAQAAALyJuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVS66uDHGqLq6Wny8DwAAdrro4ubYsWMKDw/XsWPHfD0KAAD4Hlx0cQMAAOxG3AAAAKsQNwAAwCrEDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKxC3AAAAKsQNwAAwCrEDQAAsApxAwAArOLv6wEAAM0XM+NVX4+AFvTJ/JG+HqFV48gNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKxC3AAAAKsQNwAAwCrEDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKxC3AAAAKsQNwAAwCrEDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKxC3AAAAKsQNwAAwCrEDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKxC3AAAAKv4PG6WLl2q2NhYBQUFKSEhQVu3bj3n9qtXr9aVV16pkJAQRUZG6rbbbtORI0daaFoAANDa+TRu1q5dq/T0dM2cOVMFBQVKSUnRiBEjVFpa2uj2b7/9tsaNG6eJEydq165deuGFF7Rjxw5NmjSphScHAACtlU/jZvHixZo4caImTZqkuLg4LVmyRFFRUVq2bFmj27/zzjuKiYlRWlqaYmNjNXjwYN1xxx3Ky8tr4ckBAEBr5bO4qa2tVX5+vlJTU93WU1NTtX379kb3SUpK0oEDB5STkyNjjA4dOqQXX3xRI0eOPOv91NTUqLq62u0HAADYy2dxc/jwYdXV1SkiIsJtPSIiQhUVFY3uk5SUpNWrV2vMmDEKDAxUly5d1L59ez366KNnvZ+srCyFh4e7fqKiorz6OAAAQOvi8xOKHQ6H22VjTIO1M4qKipSWlqYHH3xQ+fn52rBhg/bv36/Jkyef9fYzMzNVVVXl+ikrK/Pq/AAAoHXx99Udd+7cWX5+fg2O0lRWVjY4mnNGVlaWkpOTde+990qS+vTpo9DQUKWkpGjevHmKjIxssI/T6ZTT6fT+AwAAAK2Sz47cBAYGKiEhQbm5uW7rubm5SkpKanSfkydPqk0b95H9/PwkfX3EBwAAwKcvS02fPl1PPvmksrOzVVxcrGnTpqm0tNT1MlNmZqbGjRvn2v6GG27Q+vXrtWzZMu3bt0/btm1TWlqaBgwYoK5du/rqYQAAgFbEZy9LSdKYMWN05MgRzZ07V+Xl5YqPj1dOTo6io6MlSeXl5W6feXPrrbfq2LFjeuyxx3TPPfeoffv2Gjp0qBYsWOCrhwAAAFoZh7nIXs+prq5WeHi4qqqqFBYW5utxAMArYma86usR0II+mX/2j0BBK3i3FAAAgDcRNwAAwCrEDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKxC3AAAAKsQNwAAwCrEDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKxC3AAAAKsQNwAAwCrEDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACsQtwAAACrEDcAAMAqxA0AALAKcQMAAKzi7+sB0HJiZrzq6xHQgj6ZP9LXIwCAT3DkBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFZ/HzdKlSxUbG6ugoCAlJCRo69at59y+pqZGM2fOVHR0tJxOp374wx8qOzu7haYFAACtnb8v73zt2rVKT0/X0qVLlZycrCeeeEIjRoxQUVGRunfv3ug+o0eP1qFDh7RixQr17NlTlZWVOn36dAtPDgAAWiufxs3ixYs1ceJETZo0SZK0ZMkSvfbaa1q2bJmysrIabL9hwwZt3rxZ+/btU8eOHSVJMTExLTkyAABo5Xz2slRtba3y8/OVmprqtp6amqrt27c3us8rr7yixMRELVy4UN26dVPv3r3129/+Vl9++eVZ76empkbV1dVuPwAAwF4+O3Jz+PBh1dXVKSIiwm09IiJCFRUVje6zb98+vf322woKCtJLL72kw4cP684779TRo0fPet5NVlaW5syZ4/X5AQBA6+TzE4odDofbZWNMg7Uz6uvr5XA4tHr1ag0YMEDXX3+9Fi9erFWrVp316E1mZqaqqqpcP2VlZV5/DAAAoPXw2ZGbzp07y8/Pr8FRmsrKygZHc86IjIxUt27dFB4e7lqLi4uTMUYHDhxQr169GuzjdDrldDq9OzwAAGi1fHbkJjAwUAkJCcrNzXVbz83NVVJSUqP7JCcn6+DBgzp+/Lhrbc+ePWrTpo1+8IMffK/zAgCAC4NPX5aaPn26nnzySWVnZ6u4uFjTpk1TaWmpJk+eLOnrl5TGjRvn2n7s2LHq1KmTbrvtNhUVFWnLli269957NWHCBAUHB/vqYQAAgFbEp28FHzNmjI4cOaK5c+eqvLxc8fHxysnJUXR0tCSpvLxcpaWlru3btm2r3Nxc3X333UpMTFSnTp00evRozZs3z1cPAQAAtDIOY4zx9RAtqbq6WuHh4aqqqlJYWJivx2lRMTNe9fUIaEGfzB/p6xHQgnh+X1x4fp+bz98tBQAA4E3EDQAAsApxAwAArELcAAAAqxA3AADAKsQNAACwCnEDAACs4lHcbNq0yctjAAAAeIdHcXPdddfphz/8oebNm8e3bAMAgFbFo7g5ePCgpk6dqvXr1ys2NlbDhw/X888/r9raWm/PBwAAcF48ipuOHTsqLS1N7733nvLy8vSjH/1IU6ZMUWRkpNLS0lRYWOjtOQEAAJqk2ScU9+3bVzNmzNCUKVN04sQJZWdnKyEhQSkpKdq1a5c3ZgQAAGgyj+Pm1KlTevHFF3X99dcrOjpar732mh577DEdOnRI+/fvV1RUlH75y196c1YAAIDv5O/JTnfffbfWrFkjSfr1r3+thQsXKj4+3nV9aGio5s+fr5iYGK8MCQAA0FQexU1RUZEeffRR3XTTTQoMDGx0m65du+qtt95q1nAAAADny6O4eeONN777hv39NWTIEE9uHgAAwGMenXOTlZWl7OzsBuvZ2dlasGBBs4cCAADwlEdx88QTT+iyyy5rsP7jH/9Yjz/+eLOHAgAA8JRHcVNRUaHIyMgG65dcconKy8ubPRQAAICnPIqbqKgobdu2rcH6tm3b1LVr12YPBQAA4CmPTiieNGmS0tPTderUKQ0dOlTS1ycZZ2Rk6J577vHqgAAAAOfDo7jJyMjQ0aNHdeedd7q+TyooKEj33XefMjMzvTogAADA+fAobhwOhxYsWKAHHnhAxcXFCg4OVq9eveR0Or09HwAAwHnxKG7OaNu2ra666ipvzQIAANBsHsfNjh079MILL6i0tNT10tQZ69evb/ZgAAAAnvDo3VLPPfeckpOTVVRUpJdeekmnTp1SUVGR3nzzTYWHh3t7RgAAgCbzKG4eeugh/e///q/+/ve/KzAwUI888oiKi4s1evRode/e3dszAgAANJlHcVNSUqKRI0dKkpxOp06cOCGHw6Fp06Zp+fLlXh0QAADgfHgUNx07dtSxY8ckSd26ddOHH34oSfriiy908uRJ700HAABwnjw6oTglJUW5ubm64oorNHr0aE2dOlVvvvmmcnNzdc0113h7RgAAgCbzKG4ee+wxffXVV5KkzMxMBQQE6O2339aNN96oBx54wKsDAgAAnI/zjpvTp0/rb3/7m4YPHy5JatOmjTIyMpSRkeH14QAAAM7XeZ9z4+/vr9/85jeqqan5PuYBAABoFo9OKB44cKAKCgq8PQsAAECzeXTOzZ133ql77rlHBw4cUEJCgkJDQ92u79Onj1eGAwAAOF8exc2YMWMkSWlpaa41h8MhY4wcDofq6uq8Mx0AAMB58ihu9u/f7+05AAAAvMKjuImOjvb2HAAAAF7hUdw8/fTT57x+3LhxHg0DAADQXB7FzdSpU90unzp1SidPnlRgYKBCQkKIGwAA4DMevRX8888/d/s5fvy4du/ercGDB2vNmjXenhEAAKDJPIqbxvTq1Uvz589vcFQHAACgJXktbiTJz89PBw8e9OZNAgAAnBePzrl55ZVX3C4bY1ReXq7HHntMycnJXhkMAADAEx7FzS9+8Qu3yw6HQ5dccomGDh2qRYsWeWMuAAAAj3gUN/X19d6eAwAAwCu8es4NAACAr3kUN//93/+t+fPnN1j/4x//qF/+8pfNHgoAAMBTHsXN5s2bNXLkyAbr1113nbZs2dLsoQAAADzlUdwcP35cgYGBDdYDAgJUXV3d7KEAAAA85VHcxMfHa+3atQ3Wn3vuOV1++eXNHgoAAMBTHr1b6oEHHtBNN92kkpISDR06VJL0xhtvaM2aNXrhhRe8OiAAAMD58Chu/uu//ksvv/yyHnroIb344osKDg5Wnz599Prrr2vIkCHenhEAAKDJPIobSRo5cmSjJxUDAAD4kkfn3OzYsUPvvvtug/V3331XeXl5zR4KAADAUx7FzZQpU1RWVtZg/bPPPtOUKVOaPRQAAICnPIqboqIi9e/fv8F6v379VFRU1OyhAAAAPOVR3DidTh06dKjBenl5ufz9PT6NBwAAoNk8ipthw4YpMzNTVVVVrrUvvvhC999/v4YNG+a14QAAAM6XR4dZFi1apJ/+9KeKjo5Wv379JEk7d+5URESEnnnmGa8OCAAAcD48iptu3brp/fff1+rVq1VYWKjg4GDddtttuvnmmxUQEODtGQEAAJrM4xNkQkNDNXjwYHXv3l21tbWSpH/84x+Svv6QPwAAAF/wKG727dunUaNG6YMPPpDD4ZAxRg6Hw3V9XV2d1wYEAAA4Hx6dUDx16lTFxsbq0KFDCgkJ0YcffqjNmzcrMTFRmzZt8vKIAAAATefRkZt//vOfevPNN3XJJZeoTZs28vPz0+DBg5WVlaW0tDQVFBR4e04AAIAm8ejITV1dndq2bStJ6ty5sw4ePChJio6O1u7du8/rtpYuXarY2FgFBQUpISFBW7dubdJ+27Ztk7+/v/r27Xte9wcAAOzmUdzEx8fr/ffflyQNHDhQCxcu1LZt2zR37lz16NGjybezdu1apaena+bMmSooKFBKSopGjBih0tLSc+5XVVWlcePG6ZprrvFkfAAAYDGP4mbWrFmqr6+XJM2bN0+ffvqpUlJSlJOToz/96U9Nvp3Fixdr4sSJmjRpkuLi4rRkyRJFRUVp2bJl59zvjjvu0NixYzVo0CBPxgcAABbz6Jyb4cOHu/65R48eKioq0tGjR9WhQwe3d02dS21trfLz8zVjxgy39dTUVG3fvv2s+61cuVIlJSX661//qnnz5n3n/dTU1KimpsZ1ubq6uknzAQCAC5NHR24a07FjxyaHjSQdPnxYdXV1ioiIcFuPiIhQRUVFo/vs3btXM2bM0OrVq5v8HVZZWVkKDw93/URFRTV5RgAAcOHxWtx46ttB9O3PzDmjrq5OY8eO1Zw5c9S7d+8m3/6Z78A681NWVtbsmQEAQOvls6/w7ty5s/z8/BocpamsrGxwNEeSjh07pry8PBUUFOiuu+6SJNXX18sYI39/f23cuFFDhw5tsJ/T6ZTT6fx+HgQAAGh1fHbkJjAwUAkJCcrNzXVbz83NVVJSUoPtw8LC9MEHH2jnzp2un8mTJ+tHP/qRdu7cqYEDB7bU6AAAoBXz2ZEbSZo+fbpuueUWJSYmatCgQVq+fLlKS0s1efJkSV+/pPTZZ5/p6aefVps2bRQfH++2/6WXXqqgoKAG6wAA4OLl07gZM2aMjhw5orlz56q8vFzx8fHKyclRdHS0JKm8vPw7P/MGAADgmxzGGOPrIVpSdXW1wsPDVVVVpbCwMF+P06JiZrzq6xHQgj6ZP9LXI6AF8fy+uPD8Pjefv1sKAADAm4gbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBVfB43S5cuVWxsrIKCgpSQkKCtW7eeddv169dr2LBhuuSSSxQWFqZBgwbptddea8FpAQBAa+fTuFm7dq3S09M1c+ZMFRQUKCUlRSNGjFBpaWmj22/ZskXDhg1TTk6O8vPzdfXVV+uGG25QQUFBC08OAABaK4cxxvjqzgcOHKj+/ftr2bJlrrW4uDj94he/UFZWVpNu48c//rHGjBmjBx98sEnbV1dXKzw8XFVVVQoLC/No7gtVzIxXfT0CWtAn80f6egS0IJ7fFxee3+fmsyM3tbW1ys/PV2pqqtt6amqqtm/f3qTbqK+v17Fjx9SxY8ezblNTU6Pq6mq3HwAAYC+fxc3hw4dVV1eniIgIt/WIiAhVVFQ06TYWLVqkEydOaPTo0WfdJisrS+Hh4a6fqKioZs0NAABaN5+fUOxwONwuG2MarDVmzZo1mj17ttauXatLL730rNtlZmaqqqrK9VNWVtbsmQEAQOvl76s77ty5s/z8/BocpamsrGxwNOfb1q5dq4kTJ+qFF17Qtddee85tnU6nnE5ns+cFAAAXBp8duQkMDFRCQoJyc3Pd1nNzc5WUlHTW/dasWaNbb71Vzz77rEaO5IQqAADgzmdHbiRp+vTpuuWWW5SYmKhBgwZp+fLlKi0t1eTJkyV9/ZLSZ599pqefflrS12Ezbtw4PfLII/rJT37iOuoTHBys8PBwnz0OAADQevg0bsaMGaMjR45o7ty5Ki8vV3x8vHJychQdHS1JKi8vd/vMmyeeeEKnT5/WlClTNGXKFNf6+PHjtWrVqpYeHwAAtEI+/ZwbX+BzbnCx4HMwLi48vy8uPL/PzefvlgIAAPAm4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABgFeIGAABYhbgBAABWIW4AAIBViBsAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAAYBWfx83SpUsVGxuroKAgJSQkaOvWrefcfvPmzUpISFBQUJB69Oihxx9/vIUmBQAAFwKfxs3atWuVnp6umTNnqqCgQCkpKRoxYoRKS0sb3X7//v26/vrrlZKSooKCAt1///1KS0vTunXrWnhyAADQWvk0bhYvXqyJEydq0qRJiouL05IlSxQVFaVly5Y1uv3jjz+u7t27a8mSJYqLi9OkSZM0YcIEPfzwwy08OQAAaK38fXXHtbW1ys/P14wZM9zWU1NTtX379kb3+ec//6nU1FS3teHDh2vFihU6deqUAgICGuxTU1Ojmpoa1+WqqipJUnV1dXMfwgWnvuakr0dAC7oY/45fzHh+X1wu5ud3u3bt5HA4zrmNz+Lm8OHDqqurU0REhNt6RESEKioqGt2noqKi0e1Pnz6tw4cPKzIyssE+WVlZmjNnToP1qKioZkwPtH7hS3w9AYDvy8X8/K6qqlJYWNg5t/FZ3Jzx7foyxpyzyBrbvrH1MzIzMzV9+nTX5fr6eh09elSdOnX6zvLDha+6ulpRUVEqKyv7zicDgAsLz++LU7t27b5zG5/FTefOneXn59fgKE1lZWWDozNndOnSpdHt/f391alTp0b3cTqdcjqdbmvt27f3fHBckMLCwvjlB1iK5ze+zWcnFAcGBiohIUG5ublu67m5uUpKSmp0n0GDBjXYfuPGjUpMTGz0fBsAAHDx8em7paZPn64nn3xS2dnZKi4u1rRp01RaWqrJkydL+volpXHjxrm2nzx5sj799FNNnz5dxcXFys7O1ooVK/Tb3/7WVw8BAAC0Mj4952bMmDE6cuSI5s6dq/LycsXHxysnJ0fR0dGSpPLycrfPvImNjVVOTo6mTZumP//5z+ratav+9Kc/6aabbvLVQ0Ar53Q69bvf/a7BS5MALnw8v3E2DnPmjFwAAAAL+PzrFwAAALyJuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAVvH5d0sBANAUJ06c0LPPPqvt27eroqJCDodDERERSk5O1s0336zQ0FBfj4hWgs+5gXX4BQjYp6ioSMOGDdPJkyc1ZMgQRUREyBijyspKbd68WaGhodq4caMuv/xyX4+KVoC4gVX4BQjY6eqrr1aXLl301FNPKTAw0O262tpa3XrrrSovL9dbb73lownRmhA3sAq/AAE7hYSEKC8v76z/Y/Lhhx9qwIABOnnyZAtPhtaIc25glXfffVd5eXkNwkb6+pvo77//fg0YMMAHkwFojg4dOmjv3r1njZuPP/5YHTp0aOGp0FrxbilY5cwvwLPhFyBwYbr99ts1fvx4PfzwwyosLFRFRYUOHTqkwsJCPfzww5owYYLuuOMOX4+JVoIjN7DKmV+As2bN0rBhwxQRESGHw6GKigrl5ubqoYceUnp6uq/HBHCeZs+ereDgYC1evFgZGRlyOBySJGOMunTpohkzZigjI8PHU6K14JwbWGfBggV65JFHXO+Ukv7zCzA9PZ1fgMAFbv/+/aqoqJAkRUREqEePHj6eCK0NcQNrffMXYJcuXRQbG+vjiQB4W2BgoAoLCxUXF+frUdCK8LIUrBUbG9sgaMrKyvS73/1O2dnZPpoKgCemT5/e6HpdXZ3mz5+vTp06SZIWL17ckmOhleLIDS4qhYWF6t+/v+rq6nw9CoDz0KZNG1155ZVq37692/rmzZuVmJio0NBQORwOvfnmm74ZEK0KR25glVdeeeWc1+/bt6+FJgHgTX/4wx/0l7/8RYsWLdLQoUNd6wEBAVq1ahUfzAk3HLmBVdq0aSOHw6Fz/bV2OBwcuQEuQDt27NCvf/1r3XDDDcrKylJAQIACAgJUWFhI3MANn3MDq0RGRmrdunWqr69v9Oe9997z9YgAPHTVVVcpPz9f//73v5WYmKgPPvjA9Y5I4JuIG1glISHhnAHzXUd1ALRubdu21VNPPaXMzEwNGzaMo7BoFC9LwSpbt27ViRMndN111zV6/YkTJ5SXl6chQ4a08GQAvO3AgQPKz8/Xtddeq9DQUF+Pg1aEuAEAAFbhZSkAAGAV4gYAAFiFuAEAAFYhbgAAgFWIGwAXlU2bNsnhcOiLL77w9SgAvifEDYBWx+Fw6OWXX26wXltbq4ULF+rKK69USEiIOnfurOTkZK1cuVKnTp1q+UEBtEp8txSAJqmrq5PD4VCbNr75f6La2loNHz5chYWF+v3vf6/k5GSFhYXpnXfe0cMPP6x+/fqpb9++PplNkk6dOqWAgACf3T+A/+DIDWCpn/3sZ7rrrrt01113qX379urUqZNmzZrl+oTm2tpaZWRkqFu3bgoNDdXAgQO1adMm1/6rVq1S+/bt9fe//12XX365nE6nPv30U9XU1CgjI0NRUVFyOp3q1auXVqxY4dqvqKhI119/vdq2bauIiAjdcsstOnz4sNtcaWlpysjIUMeOHdWlSxfNnj3bdX1MTIwkadSoUXI4HK7LS5Ys0ZYtW/TGG29oypQp6tu3r3r06KGxY8fq3XffVa9evSRJNTU1SktL06WXXqqgoCANHjxYO3bsaPDnk5+fr8TERIWEhCgpKUm7d+92u/5vf/ubEhISFBQUpB49emjOnDk6ffq063qHw6HHH39cP//5zxUaGqp58+Y1eb8nn3xSo0aNUkhIiHr16tXgC1937dqlkSNHKiwsTO3atVNKSopKSkpc169cuVJxcXEKCgrSZZddpqVLl5717wFwUTIArDRkyBDTtm1bM3XqVPPRRx+Zv/71ryYkJMQsX77cGGPM2LFjTVJSktmyZYv5+OOPzR//+EfjdDrNnj17jDHGrFy50gQEBJikpCSzbds289FHH5njx4+b0aNHm6ioKLN+/XpTUlJiXn/9dfPcc88ZY4w5ePCg6dy5s8nMzDTFxcXmvffeM8OGDTNXX32121xhYWFm9uzZZs+ePeapp54yDofDbNy40RhjTGVlpZFkVq5cacrLy01lZaUxxpg+ffqY1NTU73zcaWlppmvXriYnJ8fs2rXLjB8/3nTo0MEcOXLEGGPMW2+9ZSSZgQMHmk2bNpldu3aZlJQUk5SU5LqNDRs2mLCwMLNq1SpTUlJiNm7caGJiYszs2bNd20gyl156qVmxYoUpKSkxn3zySZP3+8EPfmCeffZZs3fvXpOWlmbatm3rmu/AgQOmY8eO5sYbbzQ7duwwu3fvNtnZ2eajjz4yxhizfPlyExkZadatW2f27dtn1q1bZzp27GhWrVp1nn9DAHsRN4ClhgwZYuLi4kx9fb1r7b777jNxcXHm448/Ng6Hw3z22Wdu+1xzzTUmMzPTGPN13EgyO3fudF2/e/duI8nk5uY2ep8PPPBAgwApKyszkszu3btdcw0ePNhtm6uuusrcd999rsuSzEsvveS2TXBwsElLSzvnYz5+/LgJCAgwq1evdq3V1taarl27moULFxpj/hM3r7/+umubV1991UgyX375pTHGmJSUFPPQQw+53fYzzzxjIiMj3WZMT09326ap+82aNcttZofDYf7xj38YY4zJzMw0sbGxpra2ttHHGBUVZZ599lm3td///vdm0KBBZ/lTAS4+nHMDWOwnP/mJ27cmDxo0SIsWLVJeXp6MMerdu7fb9jU1NerUqZPrcmBgoPr06eO6vHPnTvn5+Z31u7ny8/P11ltvqW3btg2uKykpcd3fN29T+vrb3CsrK8/5WIwx3/kN0CUlJTp16pSSk5NdawEBARowYICKi4vdtv3mDJGRkZKkyspKde/eXfn5+dqxY4f+8Ic/uLapq6vTV199pZMnTyokJESSlJiY6HabTd3vm/cdGhqqdu3auR7/zp07lZKS0uj5O//+979VVlamiRMn6vbbb3etnz59WuHh4ef8swEuJsQNcJHy8/NTfn6+/Pz83Na/GSbBwcFuQREcHHzO26yvr9cNN9ygBQsWNLjuTEBIavAfbofDofr6+nPedu/evRsEyreZ/z+f6NsR1FgYfXOGM9edmaG+vl5z5szRjTfe2OA+goKCXP/87S9rbOp+53r85/ozPrPNX/7yFw0cONDtum//ewQuZsQNYLF33nmnweVevXqpX79+qqurU2VlpVJSUpp8e1dccYXq6+u1efNmXXvttQ2u79+/v9atW6eYmBj5+3v+6yUgIEB1dXVua2PHjtX999+vgoIC9evXz+2606dPq6amRj179lRgYKDefvttjR07VtLX72LKy8tTenp6k++/f//+2r17t3r27Hlec3u63zf16dNHTz31VKPvvoqIiFC3bt20b98+/epXv/L4PgDb8W4pwGJlZWWaPn26du/erTVr1ujRRx/V1KlT1bt3b/3qV7/SuHHjtH79eu3fv187duzQggULlJOTc9bbi4mJ0fjx4zVhwgS9/PLL2r9/vzZt2qTnn39ekjRlyhQdPXpUN998s/71r39p37592rhxoyZMmNAgVs4lJiZGb7zxhioqKvT5559LktLT05WcnKxrrrlGf/7zn1VYWKh9+/bp+eef18CBA7V3716FhobqN7/5je69915t2LBBRUVFuv3223Xy5ElNnDixyff/4IMP6umnn9bs2bO1a9cuFRcXa+3atZo1a9b3st833XXXXaqurtb//M//KC8vT3v37tUzzzzjejfX7NmzlZWVpUceeUR79uzRBx98oJUrV2rx4sVNvg/Aer495QfA92XIkCHmzjvvNJMnTzZhYWGmQ4cOZsaMGa4TjGtra82DDz5oYmJiTEBAgOnSpYsZNWqUef/9940xX59QHB4e3uB2v/zySzNt2jQTGRlpAgMDTc+ePU12drbr+j179phRo0aZ9u3bm+DgYHPZZZeZ9PR01/0OGTLETJ061e02f/7zn5vx48e7Lr/yyiumZ8+ext/f30RHR7vWv/rqK5OVlWWuuOIKExQUZDp27GiSk5PNqlWrzKlTp1zz3X333aZz587G6XSa5ORk869//ct1G2dOKP78889dawUFBUaS2b9/v2ttw4YNJikpyQQHB5uwsDAzYMAA1zvNjGn8pGdP9wsPDzcrV650XS4sLDSpqakmJCTEtGvXzqSkpJiSkhLX9atXrzZ9+/Y1gYGBpkOHDuanP/2pWb9+fYNZgIuVw5j/f5EagFV+9rOfqW/fvlqyZImvRwGAFsXLUgAAwCrEDQAAsAovSwEAAKtw5AYAAFiFuAEAAFYhbgAAgFWIGwAAYBXiBgAAWIW4AQAAViFuAACAVYgbAABglf8DeFZrNnLOEWwAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 因变量分布\n",
    "ax = df_clean.groupby(\"percentCoherence\").correct.mean().plot.bar()\n",
    "\n",
    "ax.set_ylabel(\"accuracy\")\n",
    "sns.despine()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "B3462043A40B409AA746BF7EC3CA5FCF",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "通过散点图，我们可以直观地观察到数据中不同变量的分布情况：  \n",
    "\n",
    "\n",
    "\n",
    "![Image Name](https://cdn.kesci.com/upload/so1p92nbg9.jpeg?imageView2/0/w/960/h/960)  \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "67955DBFA0DB46BE82C8A84A20B50D61",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "#### 二分数据、伯努利分布与线性回归  \n",
    "\n",
    "在示例数据中中，  \n",
    "* 因变量“correct”是一个二分类变量，表示被试是否获得正确反应。  \n",
    "* 我们考虑的自变量“percentCoherence”可以是连续变量，表示被试的刺激强度 (percentCoherence 或 motion strength)。  \n",
    "* 我们感觉兴趣的是“correct”与“percentCoherence”之间的关系。   \n",
    "\n",
    "**问题：我们是否能用线性回归来对分析这些数据？**  \n",
    "\n",
    "<center> <img src='https://cdn.kesci.com/upload/skeayxhg1s.png?imageView2/0/w/700'> </center>  \n",
    "\n",
    "> Shooshtari, S. V., Sadrabadi, J. E., Azizi, Z., & Ebrahimpour, R. (2019). Confidence representation of perceptual decision by EEG and eye data in a random dot motion task. Neuroscience, 406, 510–527. https://doi.org/10.1016/j.neuroscience.2019.03.031  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "1A0E920FADFF4AC684D242BC23554B63",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "仅考虑两种刺激强度(percentCoherence)下的数据，即 $x = 0.1$ 和 $x = 0.4$。  \n",
    "\n",
    "如何使用线性回归来对这种数据进行拟合？ $y_i = \\beta_0 + \\beta_1 * x_i$ or $Y_i \\sim N(\\mu, \\sigma), \\mu = \\beta_0 + \\beta_1 * x_i$  \n",
    "\n",
    "通常线性回归模型中因变量需要是连续的、从正无穷到负无穷，但上述数据中，不管是每个试次的反应，还是伯努利分布的参数$\\pi$都不满足线性回归的预设。  \n",
    "\n",
    "![Image Name](https://cdn.kesci.com/upload/snyz4sbvfv.png?imageView2/0/w/640/h/640)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "EF790C7A5B814506BCB3D6B9124C7A7C",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "**Step 1**: 如果不能直接对二分变量进行回归分析，是否可以考虑对产生二分变量的模型参数进行回归分析？  \n",
    "\n",
    "正确反应的概率可以看作是一个伯努利分布，即 $Y_i | \\pi_i \\sim \\text{Bern}(\\pi_i)$，其中 $\\pi_i$ 是在刺激强度 $x_i$ 下被试获得正确反应的概率。  \n",
    "\n",
    "* 曲线上的每一个点，都服从伯努利分布 $Y_i | \\pi_i \\sim \\text{Bern}(\\pi_i)$  \n",
    "\n",
    "此时，$\\pi$ 在 0-1之间，因此仍然不满足线性回归的要求，但似乎可以用了.  \n",
    "\n",
    "思考：传统上我们对正确率进行*t*-test是不是就相当于直接对 $\\pi$ 进行回归分析？这种做法有什么问题？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "BACF029DDDAE4100ABE3364AAAF5214E",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## Probability & Odds  \n",
    "\n",
    "**Step 2**: 进一步对$\\pi$进行转换，引入概念：**发生比(odds)**。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "B2EF78EBB7474A208A665E6BEFB461EA",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "**发生比(odds)**  \n",
    "\n",
    "与概率不同，发生比(odds)描述的是 **事件发生概率** 与 **事件不发生概率**之比 ，而概率则描述了事件发生的绝对可能性。  \n",
    "\n",
    "我们用“明天是否会下雨”的例子来进行说明。  \n",
    "\n",
    "在这个例子中，$\\pi$为因变量$Y$发生的概率  \n",
    "\n",
    "$$  \n",
    "\\begin{equation}  \n",
    "\\text{odds} = \\frac{\\pi}{1-\\pi} \\;\\;,\\;\\;\\;  \n",
    "\\pi = \\frac{\\text{odds}}{1 + \\text{odds}}  \n",
    "\\end{equation}  \n",
    "$$  \n",
    "\n",
    "* 比如，明天下雨发生的概率是$\\pi = 2/3$，则明天不下雨的概率为$1 - \\pi = 1/3$  \n",
    "\n",
    "    * 在这个例子中，将 $\\pi$ 带入公式得到发生比 odds 为2，明天下雨的可能性是不下雨可能性的两倍  \n",
    "    \n",
    "    * $\\pi$的值在$(0,1)$之间，odds的范围则可以是$(0,+\\infty)$  \n",
    "$$  \n",
    "\\text{odds of rain } = \\frac{2/3}{1-2/3} = 2  \n",
    "$$  \n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "C5E72075BC9549B8A3A1D644874401DF",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "事件的发生概率$\\pi \\in [0,1]$，事件对应的发生比为$\\;\\;\\;\\pi / (1-\\pi) \\in [0, \\infty)$  \n",
    "\n",
    "> 将发生比与1进行比较来衡量事件发生的不确定性：  \n",
    "\n",
    "1. 当事件发生的概率$\\pi < 0.5$时，事件的发生比小于1  \n",
    "\n",
    "2. 当事件发生的概率$\\pi = 0.5$时，事件的发生比为等于1  \n",
    "\n",
    "3. 当事件发生的概率$\\pi > 0.5$时，事件的发生比为大于1  \n",
    "\n",
    "问题：Odds仍然不是在正负无穷上均有取值，怎么办？"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "FAA959BEB13E4A93AA6DF18E09FB20D7",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "**Step 3**: 进一步对Odds进行转换，让其在正负无穷上均有取值：$log(odds)$  \n",
    "\n",
    "$\\log(\\text{odds}_i) = \\beta_0 + \\beta_1 X_{i1}$  \n",
    "\n",
    "这种情况之下，我们可以使用线性回归模型来完成数据分析了，只是对因变量进行了几次转换，使之满足了线性回归模型的假设条件。  \n",
    "\n",
    "总结起来：  \n",
    "\n",
    "$$y_i \\sim Bern (\\pi) $$  \n",
    "\n",
    "$$odds = \\frac {\\pi}{1 - \\pi}$$  \n",
    "\n",
    "$$\\log(\\text{odds}) = \\beta_0 + \\beta_1 X$$  \n",
    "\n",
    "* 在广义线性模型中，我们需要**连接函数(link function)**$g(\\cdot)$，使得参数g($\\pi_i$)可以被表示为自变量$X_{i1}$的线性组合  \n",
    "\n",
    "![Image Name](https://cdn.kesci.com/upload/snyjmb20r4.png?imageView2/0/w/960/h/960)  \n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "AA66DACE7B4448458C00D0C58D8BD74C",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 公式中各参数的意义  \n",
    "\n",
    "$$  \n",
    "\\log(\\text{odds}) = \\log\\left(\\frac{\\pi}{1-\\pi}\\right) = \\beta_0 + \\beta_1 X_1 + \\cdots + \\beta_p X_p  \n",
    "$$  \n",
    "\n",
    "也可以写成：$$\\text{odds} = e^{\\beta_0 + \\beta_1 X_{1} +\\cdots + \\beta_p X_p}$$  \n",
    "\n",
    "$\\beta_0$ 是截距项，也称为 常数项，它表示当所有自变量（$X_1, X_2, \\dots, X_p$）都为零时，log（odds） 的基线值。换句话说，$\\beta_0$ 表示模型在无任何预测变量影响时的log（odds）。  \n",
    "\n",
    "$\\beta_1, \\beta_2, \\dots, \\beta_p$ 是回归系数，分别表示每个预测变量（$X_1, X_2, \\dots, X_p$）对 log（odds）的影响。每个 $\\beta_i$ 表示对应自变量 $X_i$ 增加一个单位时，log（odds）变化的大小。  \n",
    "\n",
    "> Gelman, A., &#38; Hill, J. (2006). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge: Cambridge University Press. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "CC61FD1CFD04479E94EF54BDC2DDB500",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "* $\\beta_0$  \n",
    "\n",
    "    * 当$(X_1,X_2,\\ldots,X_p) = 0$时，$\\text{odds} = e^{\\beta_0}$，即$e^{\\beta_0}$表示当所有自变量为0时，事件的发生比  \n",
    "\n",
    "* $\\beta_1$  \n",
    "\n",
    "    * $\\beta_1 = \\log(\\text{odds}_{x+1}) - \\log(\\text{odds}_x)\\;\\;\\;$ → $\\;\\;\\; e^{\\beta_1} = \\frac{\\text{odds}_{x+1}}{\\text{odds}_x}$  \n",
    "\n",
    "    * 当其他自变量保持不变时，$X_1$每增加一个单位（从$x$ → $x+1$），$e^{\\beta_1}$表示事件发生比的倍数变化  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "258890A843FE436C818939505710DDD1",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "* 计算  \n",
    "\n",
    "    $\\log\\left(\\frac{\\pi_i}{1 - \\pi_i}\\right) = \\beta_0 + \\beta_1 X_{i1}\\;\\;\\;$ →  $\\;\\;\\;\\frac{\\pi_i}{1-\\pi_i} = e^{\\beta_0 + \\beta_1 X_{i1}}\\;\\;\\;$ →  $\\;\\;\\;\\pi_i = \\frac{e^{\\beta_0 + \\beta_1 X_{i1}}}{1 + e^{\\beta_0 + \\beta_1 X_{i1}}}$  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "F8DDBE4A9E334C599A7EE7F18B3EDB5A",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 广义线性模型(Generalized Linear Model, GLM)  \n",
    "* 对线性回归模型的推广  \n",
    "* 在因变量不满足线性模型的预设条件时，仍然使用线性模型的思路。  \n",
    "* 核心在于通过连接函数对因变量进行变换，使其满足线性模型的条件。  \n",
    "* 对二分变量的广义线性模型称为逻辑回归，还有大量适用于其他数据的广义线性模型，本质上是一致的。  \n",
    "* 回归系数的解释是难点，需要领域特殊的知识。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "74A6ED5D87D541E39B8E167AAB55C1EB",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 补充知识：更多可用的分布  \n",
    "\n",
    "|分布类型|描述概率|描述发生比|适用情况说明|  \n",
    "|---|---|---|---|  \n",
    "|二项分布|是|否|描述n次独立伯努利试验中成功次数的概率分布。|  \n",
    "|贝塔分布|是|是|描述伯努利试验中成功概率的先验分布，也可以用来描述发生比。|  \n",
    "|对数正态分布|否|是|描述正态分布变量取对数后的分布，常用于描述正比于发生比的数据。|  \n",
    "|泊松分布|是|否|描述在固定时间或空间内发生某事件的次数的概率分布。|  \n",
    "|伽马分布|否|是|描述等待时间的分布，常用于作为泊松分布中事件发生率的先验分布，因此可以用来描述发生比。|  \n",
    "|负二项分布|是|否|描述在获得r次成功之前经历n次试验的概率分布，适用于成功概率不固定的情况。|  \n",
    "|多项分布|是|否|描述多项式试验中各种结果次数的概率分布。|  \n",
    "|Dirichlet分布|是|是|描述多项分布中各种结果概率的先验分布，也可以用来描述发生比。|"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "B8EF81E97783427CAF1E9B769560D64B",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 贝叶斯广义线性模型的定义  \n",
    "\n",
    "现在，我们已经了解了逻辑回归模型的基本结构，我们可以开始定义模型了。  \n",
    "* 我们需要确定变量类型和分布。  \n",
    "* 需要根据连接函数（link function）来设置转化参数。  \n",
    "* 并且为转化后的参数设置先验分布。  \n",
    "\n",
    "$$  \n",
    "\\begin{array}{lcrl}  \n",
    "\\text{data:} & \\hspace{.01in} & Y_i|\\beta_0,\\beta_1 & \\stackrel{ind}{\\sim} \\text{Bern}(\\pi_i) \\;\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_0 + \\beta_1 X_{i1}}}{1 + e^{\\beta_0 + \\beta_1 X_{i1}}} \\\\  \n",
    "\\text{priors:} & & \\beta_{0}  &  \\sim N\\left(0, 10^2 \\right)  \\\\  \n",
    "               & & \\beta_1  & \\sim N\\left(0, 10^2 \\right)\\\\  \n",
    "\\end{array}  \n",
    "$$  \n",
    "\n",
    "注意：这里的参数先验是经过 logit 转后后的值，而不是概率。 因此，我们需要根据先验预测检验来确定先验分布参数设置是否正确。  \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false,
    "id": "1497FE623C9A417881C0E2309845CE95",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "# 数据准备\n",
    "Treatment_Coding,_ = df_clean['percentCoherence'].factorize() # 适用 treatment 编码\n",
    "y = df_clean['correct'].values  # 目标变量\n",
    "\n",
    "# 模型构建\n",
    "with pm.Model() as log_model1:\n",
    "\n",
    "    # 添加数据，方便后续绘图\n",
    "    pm.MutableData(\"percentCoherence\", df_clean['percentCoherence'])\n",
    "\n",
    "    # 设置先验\n",
    "    # 通常我们会为截距和系数设置正态分布的先验\n",
    "    intercept = pm.Normal('beta_0', mu=0, sigma=10)\n",
    "    coefficient = pm.Normal('beta_1', mu=0, sigma=10)\n",
    "    \n",
    "    # 线性预测\n",
    "    linear_predictor = intercept + coefficient * Treatment_Coding\n",
    "    \n",
    "    # 似然函数\n",
    "    # 使用逻辑函数将线性预测转换为概率\n",
    "    # 方法一：自行进行 logit link 转换\n",
    "    pi = pm.Deterministic('pi', pm.math.invlogit(linear_predictor))\n",
    "    likelihood = pm.Bernoulli('likelihood', p=pi, observed=y)\n",
    "    # 方法二：直接使用 logit_p 进行转换\n",
    "    # likelihood = pm.Bernoulli('likelihood', logit_p=linear_predictor, observed=y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "9682806A8C084DE78F00CF51451F8E00",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "注意代码中使用了 `pm.math.invlogit` 函数，它相当于计算了 Logistic sigmoid function，即 $1 / (1 + e^{-\\mu})$。  \n",
    "\n",
    "为了方便我们自行进行转化，我们可以自行定义这个函数，如下："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false,
    "id": "946A4954991C45D891E4B9FE1EC77993",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "def inv_logit(x):\n",
    "    return np.exp(x) / (1 + np.exp(x))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "39A3BE7A37794D808B9BF3B3D1673582",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 先验预测检验  \n",
    "\n",
    "使用`pm.sample_prior_predictive`进行先验预测检验，来查看由当前先验组合生成的$\\pi$是否都在$(0-1)$范围内  \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false,
    "id": "E58DDD219A92446C9951C2DB1B77CBC1",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Sampling: [beta_0, beta_1, likelihood]\n"
     ]
    }
   ],
   "source": [
    "log1_prior = pm.sample_prior_predictive(samples=50, \n",
    "                                          model=log_model1,\n",
    "                                          random_seed=84735)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "64A072D151364E5EB3340C00CB7E3870",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "* 在模型定义中我们已经对`pi`进行定义，因此`pm.sample_prior_predictive`就会自动生成对`pi`的预测  \n",
    "\n",
    "* 该预测储存在`prior`中  \n",
    "\n",
    "* 我们设置抽样数为50，这体现在维度`draw`中  \n",
    "\n",
    "* 结合循环，使用`sns.lineplot`绘制出每个回避分数对应的$\\pi$值并连接成光滑的曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false,
    "id": "E7E11C39A3BD48E08A1C186DFD6C8A01",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div>\n",
       "              <div class='xr-header'>\n",
       "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
       "              </div>\n",
       "              <ul class=\"xr-sections group-sections\">\n",
       "              \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_priorcd6bccc9-cf06-4a2e-8930-685329b43662\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_priorcd6bccc9-cf06-4a2e-8930-685329b43662\" class = \"xr-section-summary\">prior</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 223kB\n",
       "Dimensions:   (chain: 1, draw: 50, pi_dim_0: 543)\n",
       "Coordinates:\n",
       "  * chain     (chain) int64 8B 0\n",
       "  * draw      (draw) int64 400B 0 1 2 3 4 5 6 7 8 ... 41 42 43 44 45 46 47 48 49\n",
       "  * pi_dim_0  (pi_dim_0) int64 4kB 0 1 2 3 4 5 6 ... 536 537 538 539 540 541 542\n",
       "Data variables:\n",
       "    beta_0    (chain, draw) float64 400B -6.177 -19.88 10.29 ... -7.036 4.613\n",
       "    beta_1    (chain, draw) float64 400B -16.88 6.473 -4.256 ... 6.581 5.584\n",
       "    pi        (chain, draw, pi_dim_0) float64 217kB 0.002072 ... 0.9902\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:06:23.746727+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-c6652a5a-72e2-4474-b43c-16fed5a16731' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-c6652a5a-72e2-4474-b43c-16fed5a16731' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 1</li><li><span class='xr-has-index'>draw</span>: 50</li><li><span class='xr-has-index'>pi_dim_0</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-2ad0e5fa-076e-4bf4-bcc6-5b3d5af05df0' class='xr-section-summary-in' type='checkbox'  checked><label for='section-2ad0e5fa-076e-4bf4-bcc6-5b3d5af05df0' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-297d26f1-44f2-4fd4-aa06-179a4a4c7764' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-297d26f1-44f2-4fd4-aa06-179a4a4c7764' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f12ea4f7-0497-4d26-b22d-4365359c4786' class='xr-var-data-in' type='checkbox'><label for='data-f12ea4f7-0497-4d26-b22d-4365359c4786' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 44 45 46 47 48 49</div><input id='attrs-b51b4941-6e79-46a9-9b23-4082ec0281ad' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b51b4941-6e79-46a9-9b23-4082ec0281ad' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-153c6ed0-f33b-4568-9399-73fdfdb4e391' class='xr-var-data-in' type='checkbox'><label for='data-153c6ed0-f33b-4568-9399-73fdfdb4e391' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
       "       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n",
       "       36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>pi_dim_0</span></div><div class='xr-var-dims'>(pi_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-27d5e366-9862-4825-9563-6c68aa265fb0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-27d5e366-9862-4825-9563-6c68aa265fb0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-71878e0e-130f-4d07-b00d-413de24c19da' class='xr-var-data-in' type='checkbox'><label for='data-71878e0e-130f-4d07-b00d-413de24c19da' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f0660585-17f7-4bfe-8abb-86edc76b8622' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f0660585-17f7-4bfe-8abb-86edc76b8622' class='xr-section-summary' >Data variables: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-6.177 -19.88 ... -7.036 4.613</div><input id='attrs-75eaadd1-a2bc-4380-94d1-9b7a1a610500' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-75eaadd1-a2bc-4380-94d1-9b7a1a610500' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7d230361-5fb6-4d05-8bda-ecfec41f381a' class='xr-var-data-in' type='checkbox'><label for='data-7d230361-5fb6-4d05-8bda-ecfec41f381a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ -6.17718974, -19.88458672,  10.29137643,   8.62971809,\n",
       "          9.05565991,  22.82618782, -11.80997272,  -3.07078947,\n",
       "         -8.22981207,   8.67445133,   5.38628417,  -4.0557868 ,\n",
       "         18.68584079, -14.54754117, -15.2139756 ,  -0.77415906,\n",
       "        -14.90939227,  -2.00254321, -19.73573633,   9.46901295,\n",
       "          6.47989881,  -0.48754662,   5.92962112,   5.03247612,\n",
       "        -21.15466639,  -5.19492648,   8.92975829,  -9.40820653,\n",
       "          1.19016092,   1.27843593,  -7.35847739,  -2.81847584,\n",
       "         13.4669128 ,  11.25764564, -11.85330803,   6.26534445,\n",
       "         -1.55436825,   0.15301407,   7.12393384,  13.5122697 ,\n",
       "          0.04175506, -16.21446448,   0.09521454,  15.06507929,\n",
       "         23.73464584,  13.4221971 ,   1.56016038,  -7.20131638,\n",
       "         -7.03603479,   4.61281161]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-16.88 6.473 -4.256 ... 6.581 5.584</div><input id='attrs-f0fbe7fe-cc26-4b77-a200-63bacb8d4936' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f0fbe7fe-cc26-4b77-a200-63bacb8d4936' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-feda14b1-7b85-486f-82de-e24f58d0c245' class='xr-var-data-in' type='checkbox'><label for='data-feda14b1-7b85-486f-82de-e24f58d0c245' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-16.88395615,   6.47343262,  -4.25557338,  -2.94051877,\n",
       "         -8.08190392,   3.08770461,   4.44896759,   6.21647993,\n",
       "         -4.16766715,  -0.450661  ,  13.59118069,   1.91082747,\n",
       "        -12.09687328,  12.04025095,   9.94218067, -10.87902265,\n",
       "         -1.43216067,   4.07256631,  12.40708206,  12.82780909,\n",
       "         23.94866604,   9.07513818, -19.12354811,   2.72591357,\n",
       "          2.81324129,   1.55899343,  -8.45364115,   0.63066721,\n",
       "         22.21470739,  -8.75299073,  -5.59709338,  -2.58807848,\n",
       "         -3.26462481,   4.26609671,  -3.55352322, -13.24528089,\n",
       "         -5.1611264 ,  -0.77846201,  -1.06571339,   4.95616873,\n",
       "         10.04613879,   9.33459204,   8.20635463,   0.05465967,\n",
       "         -3.35336185, -11.40971204,  -3.56079202,  -3.30504414,\n",
       "          6.5808804 ,   5.58367151]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pi</span></div><div class='xr-var-dims'>(chain, draw, pi_dim_0)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.002072 9.653e-11 ... 1.0 0.9902</div><input id='attrs-856192a2-c9ea-41bb-b02e-3ef611cd469e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-856192a2-c9ea-41bb-b02e-3ef611cd469e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ac9f7be2-bcea-44bd-8960-4918b0b8580a' class='xr-var-data-in' type='checkbox'><label for='data-ac9f7be2-bcea-44bd-8960-4918b0b8580a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[2.07195257e-03, 9.65320640e-11, 9.65320640e-11, ...,\n",
       "         2.07195257e-03, 9.65320640e-11, 2.07195257e-03],\n",
       "        [2.31330934e-09, 1.49833570e-06, 1.49833570e-06, ...,\n",
       "         2.31330934e-09, 1.49833570e-06, 2.31330934e-09],\n",
       "        [9.99966077e-01, 9.97614131e-01, 9.97614131e-01, ...,\n",
       "         9.99966077e-01, 9.97614131e-01, 9.99966077e-01],\n",
       "        ...,\n",
       "        [7.45048154e-04, 2.73611103e-05, 2.73611103e-05, ...,\n",
       "         7.45048154e-04, 2.73611103e-05, 7.45048154e-04],\n",
       "        [8.78834453e-04, 3.88135964e-01, 3.88135964e-01, ...,\n",
       "         8.78834453e-04, 3.88135964e-01, 8.78834453e-04],\n",
       "        [9.90173639e-01, 9.99962700e-01, 9.99962700e-01, ...,\n",
       "         9.90173639e-01, 9.99962700e-01, 9.90173639e-01]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2953fb00-b97b-4384-a66a-bdaca69fcb8e' class='xr-section-summary-in' type='checkbox'  ><label for='section-2953fb00-b97b-4384-a66a-bdaca69fcb8e' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-ab9405b6-918d-44f0-8356-f02032cf1eb6' class='xr-index-data-in' type='checkbox'/><label for='index-ab9405b6-918d-44f0-8356-f02032cf1eb6' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-47a04de1-c968-4ce7-878b-8f4bd3e56a43' class='xr-index-data-in' type='checkbox'/><label for='index-47a04de1-c968-4ce7-878b-8f4bd3e56a43' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
       "       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n",
       "       36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>pi_dim_0</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-4ab42841-2df4-4e32-8c84-5258ec82997a' class='xr-index-data-in' type='checkbox'/><label for='index-4ab42841-2df4-4e32-8c84-5258ec82997a' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;pi_dim_0&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7baf3616-872e-41bf-8a3f-b1d045a577ad' class='xr-section-summary-in' type='checkbox'  checked><label for='section-7baf3616-872e-41bf-8a3f-b1d045a577ad' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:06:23.746727+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_prior_predictive989f1276-c635-43b6-91ac-1156ab3c7f54\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_prior_predictive989f1276-c635-43b6-91ac-1156ab3c7f54\" class = \"xr-section-summary\">prior_predictive</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 222kB\n",
       "Dimensions:           (chain: 1, draw: 50, likelihood_dim_0: 543)\n",
       "Coordinates:\n",
       "  * chain             (chain) int64 8B 0\n",
       "  * draw              (draw) int64 400B 0 1 2 3 4 5 6 7 ... 43 44 45 46 47 48 49\n",
       "  * likelihood_dim_0  (likelihood_dim_0) int64 4kB 0 1 2 3 4 ... 539 540 541 542\n",
       "Data variables:\n",
       "    likelihood        (chain, draw, likelihood_dim_0) int64 217kB 0 0 0 ... 1 1\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:06:23.755289+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-2e4768cb-c291-49d8-9dc4-f1840963fbe7' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-2e4768cb-c291-49d8-9dc4-f1840963fbe7' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 1</li><li><span class='xr-has-index'>draw</span>: 50</li><li><span class='xr-has-index'>likelihood_dim_0</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-e291eb0c-b62f-422a-a1aa-2a15ccc842fc' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e291eb0c-b62f-422a-a1aa-2a15ccc842fc' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-209200ee-0a64-4d25-95bc-e04e1dbbb6da' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-209200ee-0a64-4d25-95bc-e04e1dbbb6da' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-06f659f5-4ba0-403d-8c6d-c364e1519cbd' class='xr-var-data-in' type='checkbox'><label for='data-06f659f5-4ba0-403d-8c6d-c364e1519cbd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 6 ... 44 45 46 47 48 49</div><input id='attrs-bf7abb70-a73d-4693-9a55-ca8985953829' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bf7abb70-a73d-4693-9a55-ca8985953829' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-73abefc0-6455-4ac7-9dcd-7a4d6c1b2474' class='xr-var-data-in' type='checkbox'><label for='data-73abefc0-6455-4ac7-9dcd-7a4d6c1b2474' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
       "       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n",
       "       36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>likelihood_dim_0</span></div><div class='xr-var-dims'>(likelihood_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-32d5b1f9-796b-4d56-98de-91506a9cd31c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-32d5b1f9-796b-4d56-98de-91506a9cd31c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-e7c083fb-3596-4e8a-aec5-e0b283bba86d' class='xr-var-data-in' type='checkbox'><label for='data-e7c083fb-3596-4e8a-aec5-e0b283bba86d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ec877328-73f5-4115-a755-b2ae521262af' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ec877328-73f5-4115-a755-b2ae521262af' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>likelihood</span></div><div class='xr-var-dims'>(chain, draw, likelihood_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 0 0 0 0 0 0 ... 1 1 1 1 1 1 1 1</div><input id='attrs-7b662790-a54b-4e71-97e2-f8804a5a6ed5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7b662790-a54b-4e71-97e2-f8804a5a6ed5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5c7997bf-9099-4fbd-bd3c-70935206eb38' class='xr-var-data-in' type='checkbox'><label for='data-5c7997bf-9099-4fbd-bd3c-70935206eb38' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [1, 1, 1, ..., 1, 1, 1],\n",
       "        ...,\n",
       "        [0, 0, 0, ..., 0, 0, 0],\n",
       "        [0, 1, 0, ..., 0, 0, 0],\n",
       "        [1, 1, 1, ..., 1, 1, 1]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-aa056395-0484-4704-b315-dd4d52cc4536' class='xr-section-summary-in' type='checkbox'  ><label for='section-aa056395-0484-4704-b315-dd4d52cc4536' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-389c950b-8089-4afd-ba00-a838d3448dfb' class='xr-index-data-in' type='checkbox'/><label for='index-389c950b-8089-4afd-ba00-a838d3448dfb' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-6584ef63-3e38-4329-9879-c7f0e04a135b' class='xr-index-data-in' type='checkbox'/><label for='index-6584ef63-3e38-4329-9879-c7f0e04a135b' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,\n",
       "       18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,\n",
       "       36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>likelihood_dim_0</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-07c1aab2-f2a2-44d8-a64e-95a28398009a' class='xr-index-data-in' type='checkbox'/><label for='index-07c1aab2-f2a2-44d8-a64e-95a28398009a' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;likelihood_dim_0&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b483f6da-5f10-4094-a931-27da3a23eea0' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b483f6da-5f10-4094-a931-27da3a23eea0' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:06:23.755289+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_observed_data43408242-7b36-42e1-b16b-bf3d40cb1a69\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_observed_data43408242-7b36-42e1-b16b-bf3d40cb1a69\" class = \"xr-section-summary\">observed_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 9kB\n",
       "Dimensions:           (likelihood_dim_0: 543)\n",
       "Coordinates:\n",
       "  * likelihood_dim_0  (likelihood_dim_0) int64 4kB 0 1 2 3 4 ... 539 540 541 542\n",
       "Data variables:\n",
       "    likelihood        (likelihood_dim_0) int64 4kB 1 0 1 1 1 1 1 ... 1 1 1 1 1 0\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:06:23.761201+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-370aed7e-f1ff-47d7-9957-e9f07d798032' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-370aed7e-f1ff-47d7-9957-e9f07d798032' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>likelihood_dim_0</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-78ac0a11-0df8-417d-bd44-8db8624f9fdd' class='xr-section-summary-in' type='checkbox'  checked><label for='section-78ac0a11-0df8-417d-bd44-8db8624f9fdd' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>likelihood_dim_0</span></div><div class='xr-var-dims'>(likelihood_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-5699cc6a-9726-483e-9a06-aa576d29cbe6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5699cc6a-9726-483e-9a06-aa576d29cbe6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-664457a1-9ed5-4c2b-b5c3-7ba90981c676' class='xr-var-data-in' type='checkbox'><label for='data-664457a1-9ed5-4c2b-b5c3-7ba90981c676' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e67c33b7-bd5f-45e3-a9de-1e87b261a380' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e67c33b7-bd5f-45e3-a9de-1e87b261a380' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>likelihood</span></div><div class='xr-var-dims'>(likelihood_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 0 1 1 1 1 1 1 ... 0 1 1 1 1 1 1 0</div><input id='attrs-6edf90a2-4a03-4029-9e94-3fd2a3ceb94b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6edf90a2-4a03-4029-9e94-3fd2a3ceb94b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b368062f-2341-4d51-8ea1-18cf5f4a072b' class='xr-var-data-in' type='checkbox'><label for='data-b368062f-2341-4d51-8ea1-18cf5f4a072b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1,\n",
       "       1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1,\n",
       "       1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-48c30ef1-ecfe-43eb-a70e-fcb2267eab10' class='xr-section-summary-in' type='checkbox'  ><label for='section-48c30ef1-ecfe-43eb-a70e-fcb2267eab10' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>likelihood_dim_0</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-cbbc15d6-60f6-46e5-beaf-27c7ee7463ea' class='xr-index-data-in' type='checkbox'/><label for='index-cbbc15d6-60f6-46e5-beaf-27c7ee7463ea' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;likelihood_dim_0&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-fc4fb767-300d-4358-b4df-593a2165e1fd' class='xr-section-summary-in' type='checkbox'  checked><label for='section-fc4fb767-300d-4358-b4df-593a2165e1fd' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:06:23.761201+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_constant_datacae50587-95d2-45f2-87ec-4413fe0fcc1b\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_constant_datacae50587-95d2-45f2-87ec-4413fe0fcc1b\" class = \"xr-section-summary\">constant_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 7kB\n",
       "Dimensions:                 (percentCoherence_dim_0: 543)\n",
       "Coordinates:\n",
       "  * percentCoherence_dim_0  (percentCoherence_dim_0) int64 4kB 0 1 2 ... 541 542\n",
       "Data variables:\n",
       "    percentCoherence        (percentCoherence_dim_0) int32 2kB 10 40 ... 40 10\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:06:23.765577+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-a8100525-053b-4d46-a3c2-7786587fbe06' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-a8100525-053b-4d46-a3c2-7786587fbe06' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>percentCoherence_dim_0</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-16bbe3e8-c601-437f-bb41-3a75fd781f4c' class='xr-section-summary-in' type='checkbox'  checked><label for='section-16bbe3e8-c601-437f-bb41-3a75fd781f4c' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>percentCoherence_dim_0</span></div><div class='xr-var-dims'>(percentCoherence_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-58c7b5f9-41e3-42d0-bf1b-1eb984a9de5c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-58c7b5f9-41e3-42d0-bf1b-1eb984a9de5c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ff968454-e88d-48fe-84b6-97d3a2063ef8' class='xr-var-data-in' type='checkbox'><label for='data-ff968454-e88d-48fe-84b6-97d3a2063ef8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8dce63fc-1316-43f2-889c-f2c0867ef9a7' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8dce63fc-1316-43f2-889c-f2c0867ef9a7' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>percentCoherence</span></div><div class='xr-var-dims'>(percentCoherence_dim_0)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>10 40 40 10 10 ... 10 10 10 40 10</div><input id='attrs-07aa0807-4710-4d0a-8c27-84f9be5f41e6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-07aa0807-4710-4d0a-8c27-84f9be5f41e6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-98defc47-a5cf-4659-9dda-b944da0aed3b' class='xr-var-data-in' type='checkbox'><label for='data-98defc47-a5cf-4659-9dda-b944da0aed3b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([10, 40, 40, 10, 10, 40, 10, 40, 10, 40, 40, 40, 40, 10, 40, 10, 10,\n",
       "       10, 40, 40, 10, 40, 40, 10, 40, 40, 10, 40, 40, 10, 40, 40, 40, 10,\n",
       "       40, 40, 40, 40, 10, 10, 10, 40, 40, 10, 40, 40, 10, 40, 40, 10, 40,\n",
       "       10, 40, 40, 40, 10, 40, 10, 40, 10, 40, 40, 40, 10, 40, 10, 10, 40,\n",
       "       10, 40, 10, 10, 40, 40, 40, 40, 10, 40, 40, 10, 10, 40, 10, 40, 40,\n",
       "       10, 10, 10, 10, 40, 40, 10, 40, 40, 40, 10, 40, 10, 40, 10, 40, 40,\n",
       "       10, 40, 10, 40, 10, 40, 10, 40, 10, 10, 40, 40, 40, 10, 10, 40, 40,\n",
       "       10, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 10, 40, 10,\n",
       "       40, 40, 40, 40, 10, 40, 40, 40, 10, 40, 40, 40, 10, 40, 10, 40, 40,\n",
       "       10, 40, 10, 10, 40, 40, 10, 40, 10, 40, 10, 10, 40, 10, 40, 10, 10,\n",
       "       40, 10, 10, 10, 40, 10, 40, 10, 40, 10, 40, 10, 10, 10, 40, 40, 40,\n",
       "       40, 40, 40, 10, 10, 40, 40, 10, 10, 40, 40, 10, 40, 40, 40, 10, 10,\n",
       "       40, 40, 40, 10, 40, 40, 10, 40, 40, 40, 10, 40, 40, 10, 40, 10, 10,\n",
       "       40, 40, 40, 40, 40, 10, 10, 40, 40, 40, 40, 10, 10, 10, 40, 10, 10,\n",
       "       40, 10, 10, 10, 10, 40, 40, 10, 10, 10, 40, 10, 40, 10, 40, 40, 40,\n",
       "       10, 40, 40, 10, 10, 10, 40, 10, 40, 10, 40, 40, 10, 10, 10, 10, 10,\n",
       "       10, 40, 10, 40, 10, 10, 10, 40, 40, 40, 10, 10, 10, 10, 10, 40, 10,\n",
       "       40, 40, 40, 40, 10, 40, 10, 10, 10, 40, 10, 10, 40, 10, 10, 40, 40,\n",
       "       10, 10, 40, 40, 10, 40, 10, 40, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n",
       "       40, 40, 40, 10, 10, 10, 40, 40, 10, 40, 40, 40, 40, 10, 40, 10, 10,\n",
       "       10, 40, 10, 40, 10, 10, 40, 10, 10, 10, 10, 10, 40, 10, 40, 40, 10,\n",
       "       10, 40, 40, 40, 40, 40, 40, 40, 10, 10, 10, 40, 40, 10, 10, 40, 40,\n",
       "       40, 10, 40, 40, 10, 10, 10, 10, 10, 40, 40, 10, 40, 40, 10, 40, 10,\n",
       "       10, 40, 40, 40, 40, 10, 40, 40, 40, 40, 40, 40, 40, 40, 10, 10, 10,\n",
       "       10, 10, 40, 40, 40, 40, 10, 40, 40, 40, 40, 10, 10, 10, 10, 10, 10,\n",
       "       40, 10, 10, 40, 10, 10, 40, 10, 10, 40, 10, 10, 40, 40, 10, 10, 40,\n",
       "       40, 10, 40, 10, 40, 10, 40, 40, 10, 10, 40, 40, 40, 10, 10, 40, 40,\n",
       "       10, 40, 40, 40, 40, 40, 40, 40, 40, 10, 10, 40, 10, 10, 10, 10, 10,\n",
       "       10, 40, 10, 40, 40, 40, 40, 10, 40, 40, 10, 10, 40, 10, 10, 10, 10,\n",
       "       40, 10, 10, 40, 40, 10, 10, 10, 10, 10, 40, 10, 10, 40, 10, 10, 10,\n",
       "       10, 40, 40, 10, 40, 40, 10, 10, 40, 10, 40, 40, 40, 10, 40, 40, 10,\n",
       "       40, 40, 10, 10, 40, 10, 40, 10, 10, 10, 40, 10, 10, 10, 40, 10],\n",
       "      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-69034269-9f4a-4966-bd40-c84ae56b1cc7' class='xr-section-summary-in' type='checkbox'  ><label for='section-69034269-9f4a-4966-bd40-c84ae56b1cc7' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>percentCoherence_dim_0</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-629fe116-5f6f-4de0-88cc-3c142ff8f107' class='xr-index-data-in' type='checkbox'/><label for='index-629fe116-5f6f-4de0-88cc-3c142ff8f107' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;percentCoherence_dim_0&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5794a0dc-8e84-4756-8aab-96a5fc18415a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5794a0dc-8e84-4756-8aab-96a5fc18415a' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:06:23.765577+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "              </ul>\n",
       "            </div>\n",
       "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-sections.group-sections {\n",
       "  grid-template-columns: auto;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2 {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       ".xr-wrap{width:700px!important;} </style>"
      ],
      "text/plain": [
       "Inference data with groups:\n",
       "\t> prior\n",
       "\t> prior_predictive\n",
       "\t> observed_data\n",
       "\t> constant_data"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "log1_prior"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false,
    "id": "CDB41CF2F7B94F43AEBFC356C106D29C",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/3384EEEA73C449A79471E52B3E3F4215/so0eerlodo.png\">"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#对于一次抽样，可以绘制出一条曲线，结合循环绘制出50条曲线\n",
    "for i in range(log1_prior.prior.dims[\"draw\"]):\n",
    "    sns.lineplot(x = log1_prior.constant_data[\"percentCoherence\"],\n",
    "                y = log1_prior.prior[\"pi\"].stack(sample=(\"chain\", \"draw\"))[:,i], c=\"grey\" )\n",
    "\n",
    "#设置x、y轴标题和总标题    \n",
    "plt.xlabel(\"percentCoherence\",\n",
    "           fontsize=12)\n",
    "plt.ylabel(\"probability of correct\",\n",
    "           fontsize=12)\n",
    "plt.suptitle(\"Relationships between percentCoherence and the probability of correct\",\n",
    "           fontsize=14)\n",
    "sns.despine()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "12BFF2E3962B43F982CC940882A3DEC3",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## MCMC采样 & 模型诊断"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false,
    "id": "6FCDE49FF8544B909AF5ABEB8D4DA2C6",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Sampling 4 chains, 0 divergences <span style=\"color: #008000; text-decoration-color: #008000\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span> <span style=\"color: #800080; text-decoration-color: #800080\">100%</span> <span style=\"color: #008080; text-decoration-color: #008080\">0:00:00</span> / <span style=\"color: #808000; text-decoration-color: #808000\">0:00:23</span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "Sampling 4 chains, 0 divergences \u001b[32m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[36m0:00:00\u001b[0m / \u001b[33m0:00:23\u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ],
      "text/plain": []
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 23 seconds.\n"
     ]
    }
   ],
   "source": [
    "#===========================\n",
    "#     注意！！！以下代码可能需要运行35s~1分钟左右\n",
    "#===========================\n",
    "with log_model1:\n",
    "    # 模型编译和采样\n",
    "    log_model1_trace = pm.sample(draws=5000,                 \n",
    "                                tune=1000,                  \n",
    "                                chains=4,                     \n",
    "                                discard_tuned_samples=True, \n",
    "                                random_seed=84735)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false,
    "id": "35F4FCACF748400DA7337DD3C96081D2",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/E5502209395E47A8BCC863DCC5A5B0EE/so0eg4l73x.png\">"
      ],
      "text/plain": [
       "<Figure size 700x600 with 4 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "az.plot_trace(log_model1_trace,\n",
    "              var_names=[\"beta_0\",\"beta_1\"],\n",
    "              figsize=(7, 6),\n",
    "              compact=False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "0B5CD9C153E34AA9B769176321633977",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 后验参数解释  \n",
    "\n",
    "以下的结果显示：  \n",
    "- $\\beta_0 = 0.786$，那么 $e^{\\beta_0} = 2.195$， $X_{i1} = 0$ 时（例如，$X_{i1}$ 没有影响），则事件发生的 odds 为 $e^{\\beta_0} 为 2.195$。  \n",
    "- $\\beta_1 = 1.765$， $e^{\\beta_1} = 5.859$， $X_{i1}$ 每增加 1 个单位，odds 将增加 $e^{\\beta_1} 的 5.859$ 倍  \n",
    "- 然而，$\\beta_1$ 的94%HDI包括0，说明点的一致性方向概率不能有效预测判断是否正确的概率。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false,
    "id": "566337B34B5B4AD1B842F08C32980802",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>sd</th>\n",
       "      <th>hdi_3%</th>\n",
       "      <th>hdi_97%</th>\n",
       "      <th>mcse_mean</th>\n",
       "      <th>mcse_sd</th>\n",
       "      <th>ess_bulk</th>\n",
       "      <th>ess_tail</th>\n",
       "      <th>r_hat</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>beta_0</th>\n",
       "      <td>0.784</td>\n",
       "      <td>0.136</td>\n",
       "      <td>0.530</td>\n",
       "      <td>1.036</td>\n",
       "      <td>0.001</td>\n",
       "      <td>0.001</td>\n",
       "      <td>11976.0</td>\n",
       "      <td>12726.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>beta_1</th>\n",
       "      <td>1.766</td>\n",
       "      <td>0.265</td>\n",
       "      <td>1.271</td>\n",
       "      <td>2.266</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.002</td>\n",
       "      <td>11399.0</td>\n",
       "      <td>12131.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  ess_bulk  ess_tail  \\\n",
       "beta_0  0.784  0.136   0.530    1.036      0.001    0.001   11976.0   12726.0   \n",
       "beta_1  1.766  0.265   1.271    2.266      0.002    0.002   11399.0   12131.0   \n",
       "\n",
       "        r_hat  \n",
       "beta_0    1.0  \n",
       "beta_1    1.0  "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fitted_parameters = az.summary(log_model1_trace, var_names=[\"beta_0\",\"beta_1\"])\n",
    "fitted_parameters"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "4DDCD03ECE634FD09DD65F0E8423A573",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "为了将发生比转换为概率，我们需要计算适用逆运算，如下："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false,
    "id": "EAFE54314C0C49CBA0FC674E2D5D3C4E",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "p(coherence=10) = 0.687 p(coherence=40) = 0.972\n"
     ]
    }
   ],
   "source": [
    "def inv_logit(log_odds):\n",
    "    return np.exp(log_odds) / (1 + np.exp(log_odds))\n",
    "\n",
    "p_coh10 = inv_logit( fitted_parameters.loc[\"beta_0\", \"mean\"])\n",
    "p_coh40 = inv_logit( \n",
    "    fitted_parameters.loc[\"beta_1\", \"mean\"] + \\\n",
    "        fitted_parameters.loc[\"beta_1\", \"mean\"]\n",
    ")\n",
    "\n",
    "print(f\"p(coherence=10) = {p_coh10:.3f}\", f\"p(coherence=40) = {p_coh40:.3f}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false,
    "id": "E1D4ED5454934508A343497039897CD2",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/424ECAC263A742AA81C40711017450E4/so0eg4n8n8.png\">"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 通过 inv_logit 将 beta 参数进行转换\n",
    "az.plot_posterior(log_model1_trace, var_names=[\"beta_0\"], transform = inv_logit)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "905ABA83F5394C01B572BB258C5489E3",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 后验回归模型  \n",
    "\n",
    "### 绘制后验预测回归线  \n",
    "\n",
    "* 和先验预测模型类似的，通过MCMC采样，也同样生成了对$\\pi$的估计，储存在`posterior`中  \n",
    "\n",
    "* 有4条马尔科夫链，每条链上的采样数为2000，所以对于每一个x，都生成了20000个预测值$\\pi$，这样就对应着20000条后验预测回归线  \n",
    "\n",
    "* 这里我们只需要画出100条即可"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false,
    "id": "A66A97B7E13B4071991D56A8F89F78D6",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div>\n",
       "              <div class='xr-header'>\n",
       "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
       "              </div>\n",
       "              <ul class=\"xr-sections group-sections\">\n",
       "              \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_posterior7bf65bc1-d736-43c4-9a20-27359938df2d\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_posterior7bf65bc1-d736-43c4-9a20-27359938df2d\" class = \"xr-section-summary\">posterior</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 87MB\n",
       "Dimensions:   (chain: 4, draw: 5000, pi_dim_0: 543)\n",
       "Coordinates:\n",
       "  * chain     (chain) int64 32B 0 1 2 3\n",
       "  * draw      (draw) int64 40kB 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n",
       "  * pi_dim_0  (pi_dim_0) int64 4kB 0 1 2 3 4 5 6 ... 536 537 538 539 540 541 542\n",
       "Data variables:\n",
       "    beta_0    (chain, draw) float64 160kB 0.9948 0.7442 0.7936 ... 0.992 0.6562\n",
       "    beta_1    (chain, draw) float64 160kB 1.769 1.854 1.877 ... 2.2 1.494 1.933\n",
       "    pi        (chain, draw, pi_dim_0) float64 87MB 0.73 0.9407 ... 0.9302 0.6584\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:07:12.911882+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2\n",
       "    sampling_time:              23.16272521018982\n",
       "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-a3022e62-7112-447c-9707-3a1bd0f8bd84' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-a3022e62-7112-447c-9707-3a1bd0f8bd84' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>pi_dim_0</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-5cc1b157-48dd-4652-bb8c-fb6755b1e72b' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5cc1b157-48dd-4652-bb8c-fb6755b1e72b' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-2d65dbc2-0d80-4bbb-98a4-75db012e6432' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2d65dbc2-0d80-4bbb-98a4-75db012e6432' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-800f54d6-6457-4e3d-9f89-728c6db4034c' class='xr-var-data-in' type='checkbox'><label for='data-800f54d6-6457-4e3d-9f89-728c6db4034c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-a3478f41-e2ae-405f-9f9b-106d848df50a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a3478f41-e2ae-405f-9f9b-106d848df50a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ca7d4268-5bfa-47ee-a53f-2f177ea2b5ad' class='xr-var-data-in' type='checkbox'><label for='data-ca7d4268-5bfa-47ee-a53f-2f177ea2b5ad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>pi_dim_0</span></div><div class='xr-var-dims'>(pi_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-feefca0d-e63b-4b53-936e-f3d62a452c75' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-feefca0d-e63b-4b53-936e-f3d62a452c75' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7a807cb1-58a3-43a9-97ff-18608cccbf52' class='xr-var-data-in' type='checkbox'><label for='data-7a807cb1-58a3-43a9-97ff-18608cccbf52' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2b681891-e648-4dda-b768-72688d601c3e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-2b681891-e648-4dda-b768-72688d601c3e' class='xr-section-summary' >Data variables: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9948 0.7442 ... 0.992 0.6562</div><input id='attrs-713176a6-4f0f-416e-b35f-4ef83b54f01c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-713176a6-4f0f-416e-b35f-4ef83b54f01c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7f28c84c-0686-42aa-87b0-fc4ade97c4ec' class='xr-var-data-in' type='checkbox'><label for='data-7f28c84c-0686-42aa-87b0-fc4ade97c4ec' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.9947656 , 0.74421625, 0.79362446, ..., 0.77866568, 0.66390201,\n",
       "        0.87139023],\n",
       "       [0.75925416, 0.75925416, 0.75346019, ..., 0.8411141 , 0.69981285,\n",
       "        0.89849515],\n",
       "       [0.70892934, 0.86217532, 0.85230041, ..., 0.98297286, 0.98076878,\n",
       "        0.69398546],\n",
       "       [0.93593267, 0.64820563, 0.72996816, ..., 0.67038551, 0.99201286,\n",
       "        0.65623057]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.769 1.854 1.877 ... 1.494 1.933</div><input id='attrs-58475b2b-5053-4ab6-bede-6ef6860d5d64' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-58475b2b-5053-4ab6-bede-6ef6860d5d64' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3dd86fd4-7b6f-47e6-a3c2-f072c1a24e27' class='xr-var-data-in' type='checkbox'><label for='data-3dd86fd4-7b6f-47e6-a3c2-f072c1a24e27' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.76869468, 1.85351909, 1.87727837, ..., 2.05434466, 1.70299934,\n",
       "        1.48402924],\n",
       "       [1.65172696, 1.65172696, 1.71056619, ..., 1.51009285, 1.90192925,\n",
       "        1.65887583],\n",
       "       [1.70312505, 1.52486601, 1.72169379, ..., 1.25368588, 1.28117819,\n",
       "        1.70402348],\n",
       "       [2.11364458, 1.36329077, 1.74241475, ..., 2.1995524 , 1.49400839,\n",
       "        1.93325351]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pi</span></div><div class='xr-var-dims'>(chain, draw, pi_dim_0)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.73 0.9407 ... 0.9302 0.6584</div><input id='attrs-3a92305e-3340-4525-9d3c-281e7d14f2d2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3a92305e-3340-4525-9d3c-281e7d14f2d2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-12370e63-01c6-4de1-93a2-add6c912bd56' class='xr-var-data-in' type='checkbox'><label for='data-12370e63-01c6-4de1-93a2-add6c912bd56' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.73002819, 0.94066905, 0.94066905, ..., 0.73002819,\n",
       "         0.94066905, 0.73002819],\n",
       "        [0.67791715, 0.93071569, 0.93071569, ..., 0.67791715,\n",
       "         0.93071569, 0.67791715],\n",
       "        [0.68860904, 0.9352877 , 0.9352877 , ..., 0.68860904,\n",
       "         0.9352877 , 0.68860904],\n",
       "        ...,\n",
       "        [0.68539247, 0.94443379, 0.94443379, ..., 0.68539247,\n",
       "         0.94443379, 0.68539247],\n",
       "        [0.66013637, 0.91426829, 0.91426829, ..., 0.66013637,\n",
       "         0.91426829, 0.66013637],\n",
       "        [0.70503489, 0.91336403, 0.91336403, ..., 0.70503489,\n",
       "         0.91336403, 0.70503489]],\n",
       "\n",
       "       [[0.68119178, 0.91766084, 0.91766084, ..., 0.68119178,\n",
       "         0.91766084, 0.68119178],\n",
       "        [0.68119178, 0.91766084, 0.91766084, ..., 0.68119178,\n",
       "         0.91766084, 0.68119178],\n",
       "        [0.67993219, 0.92158114, 0.92158114, ..., 0.67993219,\n",
       "         0.92158114, 0.67993219],\n",
       "...\n",
       "        [0.7276977 , 0.90349352, 0.90349352, ..., 0.7276977 ,\n",
       "         0.90349352, 0.7276977 ],\n",
       "        [0.72726073, 0.90567609, 0.90567609, ..., 0.72726073,\n",
       "         0.90567609, 0.72726073],\n",
       "        [0.66685292, 0.91667535, 0.91667535, ..., 0.66685292,\n",
       "         0.91667535, 0.66685292]],\n",
       "\n",
       "       [[0.71827734, 0.95476427, 0.95476427, ..., 0.71827734,\n",
       "         0.95476427, 0.71827734],\n",
       "        [0.65660599, 0.88199885, 0.88199885, ..., 0.65660599,\n",
       "         0.88199885, 0.65660599],\n",
       "        [0.67479829, 0.92218294, 0.92218294, ..., 0.67479829,\n",
       "         0.92218294, 0.67479829],\n",
       "        ...,\n",
       "        [0.66158948, 0.94634019, 0.94634019, ..., 0.66158948,\n",
       "         0.94634019, 0.66158948],\n",
       "        [0.72948532, 0.92315603, 0.92315603, ..., 0.72948532,\n",
       "         0.92315603, 0.72948532],\n",
       "        [0.65841313, 0.93018172, 0.93018172, ..., 0.65841313,\n",
       "         0.93018172, 0.65841313]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-47022692-25ba-4f4f-9329-19d362fe015b' class='xr-section-summary-in' type='checkbox'  ><label for='section-47022692-25ba-4f4f-9329-19d362fe015b' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-0125634b-1efd-45f8-9561-c624997ce7a1' class='xr-index-data-in' type='checkbox'/><label for='index-0125634b-1efd-45f8-9561-c624997ce7a1' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-b545d55d-c801-4357-9103-887469a1687e' class='xr-index-data-in' type='checkbox'/><label for='index-b545d55d-c801-4357-9103-887469a1687e' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([   0,    1,    2,    3,    4,    5,    6,    7,    8,    9,\n",
       "       ...\n",
       "       4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=5000))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>pi_dim_0</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-bdc0c810-c4fd-4996-a978-8a30c88d2721' class='xr-index-data-in' type='checkbox'/><label for='index-bdc0c810-c4fd-4996-a978-8a30c88d2721' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;pi_dim_0&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6f4527b2-2d66-4d45-8d41-0ab026a4f63a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-6f4527b2-2d66-4d45-8d41-0ab026a4f63a' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:12.911882+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>23.16272521018982</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_sample_statsaff006c9-7c45-41c7-a5ec-03cda1c6524f\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_sample_statsaff006c9-7c45-41c7-a5ec-03cda1c6524f\" class = \"xr-section-summary\">sample_stats</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 2MB\n",
       "Dimensions:                (chain: 4, draw: 5000)\n",
       "Coordinates:\n",
       "  * chain                  (chain) int64 32B 0 1 2 3\n",
       "  * draw                   (draw) int64 40kB 0 1 2 3 4 ... 4996 4997 4998 4999\n",
       "Data variables: (12/17)\n",
       "    acceptance_rate        (chain, draw) float64 160kB 0.9059 0.9571 ... 0.908\n",
       "    diverging              (chain, draw) bool 20kB False False ... False False\n",
       "    energy                 (chain, draw) float64 160kB 244.2 243.2 ... 243.7\n",
       "    energy_error           (chain, draw) float64 160kB 0.3142 ... -0.1557\n",
       "    index_in_trajectory    (chain, draw) int64 160kB 2 3 -1 -2 2 ... -6 1 -4 -2\n",
       "    largest_eigval         (chain, draw) float64 160kB nan nan nan ... nan nan\n",
       "    ...                     ...\n",
       "    process_time_diff      (chain, draw) float64 160kB 0.00114 ... 0.0007685\n",
       "    reached_max_treedepth  (chain, draw) bool 20kB False False ... False False\n",
       "    smallest_eigval        (chain, draw) float64 160kB nan nan nan ... nan nan\n",
       "    step_size              (chain, draw) float64 160kB 1.048 1.048 ... 1.031\n",
       "    step_size_bar          (chain, draw) float64 160kB 0.9925 0.9925 ... 0.9438\n",
       "    tree_depth             (chain, draw) int64 160kB 2 2 2 2 2 2 ... 2 3 3 1 3 2\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:07:12.955550+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2\n",
       "    sampling_time:              23.16272521018982\n",
       "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-60f97418-fe20-4f7d-8b77-233e98170e30' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-60f97418-fe20-4f7d-8b77-233e98170e30' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-38224c5e-095b-4aac-95ca-db101521c4fe' class='xr-section-summary-in' type='checkbox'  checked><label for='section-38224c5e-095b-4aac-95ca-db101521c4fe' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-e156f4d3-3ecc-4159-abbe-3cb9ed59163a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e156f4d3-3ecc-4159-abbe-3cb9ed59163a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-308f982d-53a3-4995-a57f-885b9f0c13f7' class='xr-var-data-in' type='checkbox'><label for='data-308f982d-53a3-4995-a57f-885b9f0c13f7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-03348bda-1a31-4813-883c-95f2300d5728' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-03348bda-1a31-4813-883c-95f2300d5728' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-09b7f170-14be-4579-a115-333587a581d0' class='xr-var-data-in' type='checkbox'><label for='data-09b7f170-14be-4579-a115-333587a581d0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1d950cd9-d77a-4e80-8dea-b0d8b910ca89' class='xr-section-summary-in' type='checkbox'  ><label for='section-1d950cd9-d77a-4e80-8dea-b0d8b910ca89' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9059 0.9571 ... 0.8802 0.908</div><input id='attrs-8ce140af-8fbc-4e68-b09d-ab4618077de1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8ce140af-8fbc-4e68-b09d-ab4618077de1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-de7ee598-8f99-4ee5-b5cb-d7c0ac6467d5' class='xr-var-data-in' type='checkbox'><label for='data-de7ee598-8f99-4ee5-b5cb-d7c0ac6467d5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.90593369, 0.95708759, 0.96444772, ..., 1.        , 0.99628317,\n",
       "        0.94969702],\n",
       "       [1.        , 0.86272   , 0.99503449, ..., 0.86221909, 0.92444307,\n",
       "        0.73159545],\n",
       "       [0.924143  , 0.94690723, 0.37988858, ..., 0.89698563, 1.        ,\n",
       "        0.92456949],\n",
       "       [0.66000246, 0.96749568, 1.        , ..., 1.        , 0.88022686,\n",
       "        0.90795077]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-b9d370c3-12c9-4dc4-8102-c0ba97480df1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b9d370c3-12c9-4dc4-8102-c0ba97480df1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dd2086e1-0ace-47dc-a9a7-3e675a2f2148' class='xr-var-data-in' type='checkbox'><label for='data-dd2086e1-0ace-47dc-a9a7-3e675a2f2148' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>244.2 243.2 242.2 ... 244.3 243.7</div><input id='attrs-76833b6a-c0f5-4f4a-9a73-d4622074ea99' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-76833b6a-c0f5-4f4a-9a73-d4622074ea99' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-52df5307-19d2-46e2-884e-f04896180a77' class='xr-var-data-in' type='checkbox'><label for='data-52df5307-19d2-46e2-884e-f04896180a77' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[244.18241862, 243.24344928, 242.19667708, ..., 243.00952825,\n",
       "        242.85589961, 243.06135002],\n",
       "       [242.19989394, 242.56811844, 242.12601456, ..., 243.03048643,\n",
       "        243.31785239, 242.91415784],\n",
       "       [243.29478959, 243.14836579, 244.91292129, ..., 245.12554069,\n",
       "        244.16834106, 244.46689026],\n",
       "       [245.8096969 , 247.2175773 , 244.01392724, ..., 243.93995206,\n",
       "        244.31452323, 243.7488913 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.3142 -0.5525 ... -0.04411 -0.1557</div><input id='attrs-373ad95e-c792-4483-9e5d-735f5aadd0eb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-373ad95e-c792-4483-9e5d-735f5aadd0eb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-052317f5-f703-4c97-bc1c-4bb030576291' class='xr-var-data-in' type='checkbox'><label for='data-052317f5-f703-4c97-bc1c-4bb030576291' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.31422319, -0.55250386,  0.05521683, ..., -0.09499121,\n",
       "         0.01121311, -0.18969152],\n",
       "       [-0.00321723,  0.        , -0.05220245, ...,  0.10907258,\n",
       "        -0.08002206,  0.05329142],\n",
       "       [ 0.00676426, -0.04754122,  0.28644219, ..., -0.05275661,\n",
       "        -0.04383381, -0.13317427],\n",
       "       [ 0.44076142, -0.41477462, -1.72743452, ..., -0.03391756,\n",
       "        -0.04410903, -0.15570544]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 3 -1 -2 2 2 ... -1 -2 -6 1 -4 -2</div><input id='attrs-764aa9fd-f27f-426a-bd76-03bd7ebc6eb1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-764aa9fd-f27f-426a-bd76-03bd7ebc6eb1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0d7fb6c1-bb36-417a-8c60-3b84781d3060' class='xr-var-data-in' type='checkbox'><label for='data-0d7fb6c1-bb36-417a-8c60-3b84781d3060' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 2,  3, -1, ...,  2,  2, -3],\n",
       "       [-1,  0,  1, ...,  1,  1, -2],\n",
       "       [ 1,  1,  2, ..., -2,  1, -3],\n",
       "       [-1,  2,  1, ...,  1, -4, -2]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-5bce3381-00ce-42e4-9b90-3b00e1558c7f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5bce3381-00ce-42e4-9b90-3b00e1558c7f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dda4b1f3-7c87-4c2b-83cc-7fb2d8d794a5' class='xr-var-data-in' type='checkbox'><label for='data-dda4b1f3-7c87-4c2b-83cc-7fb2d8d794a5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-243.7 -242.1 ... -243.2 -242.4</div><input id='attrs-80a07e87-ce4a-43f5-b9df-42a9003c8f3e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-80a07e87-ce4a-43f5-b9df-42a9003c8f3e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-034b6e8b-6a12-4c0e-8d3b-2df7504b453b' class='xr-var-data-in' type='checkbox'><label for='data-034b6e8b-6a12-4c0e-8d3b-2df7504b453b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-243.68943766, -242.05275327, -242.15822371, ..., -242.78870493,\n",
       "        -242.63531839, -242.50424822],\n",
       "       [-242.12821171, -242.12821171, -242.03636386, ..., -242.39649816,\n",
       "        -242.2074686 , -242.349315  ],\n",
       "       [-242.26047909, -242.35637314, -242.12474377, ..., -243.98032886,\n",
       "        -243.80050325, -242.36445288],\n",
       "       [-244.88638649, -245.51956731, -242.07877593, ..., -243.34044858,\n",
       "        -243.18370294, -242.44874768]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.3142 -0.6079 ... 0.4303 0.2536</div><input id='attrs-b863e7b4-fab1-4bd6-9eba-46a18f252b8f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b863e7b4-fab1-4bd6-9eba-46a18f252b8f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-046c5d66-9a91-41c7-b92e-ddc4db5fb086' class='xr-var-data-in' type='checkbox'><label for='data-046c5d66-9a91-41c7-b92e-ddc4db5fb086' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.31422319, -0.6078884 ,  0.05521683, ..., -0.33210048,\n",
       "        -0.20946445, -0.18969152],\n",
       "       [-0.03648114,  0.22991493, -0.05220245, ...,  0.18655035,\n",
       "         0.15715281,  0.51888098],\n",
       "       [ 0.1187651 ,  0.10864593,  2.19098741, ...,  0.3036757 ,\n",
       "        -0.04383381,  0.25656014],\n",
       "       [ 1.08927261, -0.73350711, -1.72743452, ..., -0.03391756,\n",
       "         0.43028984,  0.25363811]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.0 3.0 3.0 3.0 ... 7.0 1.0 7.0 3.0</div><input id='attrs-b37d80e7-8b58-4a3a-a17d-403c96de1ffe' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b37d80e7-8b58-4a3a-a17d-403c96de1ffe' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d1ac0923-9819-4da8-a73c-535250c56e32' class='xr-var-data-in' type='checkbox'><label for='data-d1ac0923-9819-4da8-a73c-535250c56e32' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3., 3., 3., ..., 3., 3., 3.],\n",
       "       [3., 3., 3., ..., 3., 3., 3.],\n",
       "       [3., 3., 3., ..., 3., 1., 3.],\n",
       "       [3., 3., 3., ..., 1., 7., 3.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.00114 0.0009777 ... 0.000768</div><input id='attrs-55c7075c-4aa2-4f66-a492-3f42131751aa' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-55c7075c-4aa2-4f66-a492-3f42131751aa' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3975fe08-79a1-43cb-998e-0f053288e964' class='xr-var-data-in' type='checkbox'><label for='data-3975fe08-79a1-43cb-998e-0f053288e964' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00113974, 0.00097772, 0.00113271, ..., 0.00095825, 0.00073808,\n",
       "        0.00065487],\n",
       "       [0.00071667, 0.000698  , 0.00066556, ..., 0.00080099, 0.00064918,\n",
       "        0.00064507],\n",
       "       [0.07091521, 0.00074637, 0.0006727 , ..., 0.00065819, 0.00034734,\n",
       "        0.00064521],\n",
       "       [0.00098316, 0.00112416, 0.00111279, ..., 0.00048098, 0.00132132,\n",
       "        0.00076799]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.137e+04 2.137e+04 ... 2.139e+04</div><input id='attrs-2178ae00-e022-4a4b-939b-05908515ba9a' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2178ae00-e022-4a4b-939b-05908515ba9a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bd3d1334-28fd-4d9a-bf6f-c0d9746f35e0' class='xr-var-data-in' type='checkbox'><label for='data-bd3d1334-28fd-4d9a-bf6f-c0d9746f35e0' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[21368.60772363, 21368.60912397, 21368.61030933, ...,\n",
       "        21386.91566353, 21386.91680832, 21386.91769058],\n",
       "       [21368.61088655, 21368.61175329, 21368.61260657, ...,\n",
       "        21386.30074205, 21386.30172235, 21386.30253158],\n",
       "       [21368.82955119, 21368.90068046, 21368.90158882, ...,\n",
       "        21387.64261124, 21387.643409  , 21387.64390386],\n",
       "       [21369.1140551 , 21369.11524419, 21369.11657623, ...,\n",
       "        21387.83679019, 21387.83743089, 21387.83891675]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.00114 0.0009778 ... 0.0007685</div><input id='attrs-cf832db9-1f9b-48f6-9bdb-27b6a6160acc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cf832db9-1f9b-48f6-9bdb-27b6a6160acc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-51cb3ae4-10c6-4517-a405-961272e372e8' class='xr-var-data-in' type='checkbox'><label for='data-51cb3ae4-10c6-4517-a405-961272e372e8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00113995, 0.0009778 , 0.00113307, ..., 0.00095854, 0.00073837,\n",
       "        0.0006553 ],\n",
       "       [0.00071691, 0.00069832, 0.00066598, ..., 0.00080121, 0.00064942,\n",
       "        0.00064512],\n",
       "       [0.00091159, 0.00074678, 0.00067324, ..., 0.00065823, 0.00034777,\n",
       "        0.00064542],\n",
       "       [0.00098327, 0.0011245 , 0.001113  , ..., 0.00048145, 0.00132151,\n",
       "        0.00076847]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-f92b79af-0aa2-49fc-99dd-365a70ad75b0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f92b79af-0aa2-49fc-99dd-365a70ad75b0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2118b992-be07-4f63-b327-b113b3014ce9' class='xr-var-data-in' type='checkbox'><label for='data-2118b992-be07-4f63-b327-b113b3014ce9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-0cf111c0-e6cc-4d87-890e-be7a7fc11b49' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0cf111c0-e6cc-4d87-890e-be7a7fc11b49' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-19c0075f-7ae2-4b27-90a8-1e14b11e2ab4' class='xr-var-data-in' type='checkbox'><label for='data-19c0075f-7ae2-4b27-90a8-1e14b11e2ab4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.048 1.048 1.048 ... 1.031 1.031</div><input id='attrs-47939994-9f07-4511-81fa-bd10bc05169d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-47939994-9f07-4511-81fa-bd10bc05169d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0b050c81-f080-4a71-b229-890cfb84111d' class='xr-var-data-in' type='checkbox'><label for='data-0b050c81-f080-4a71-b229-890cfb84111d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.0482083 , 1.0482083 , 1.0482083 , ..., 1.0482083 , 1.0482083 ,\n",
       "        1.0482083 ],\n",
       "       [1.09209072, 1.09209072, 1.09209072, ..., 1.09209072, 1.09209072,\n",
       "        1.09209072],\n",
       "       [1.03523383, 1.03523383, 1.03523383, ..., 1.03523383, 1.03523383,\n",
       "        1.03523383],\n",
       "       [1.03144702, 1.03144702, 1.03144702, ..., 1.03144702, 1.03144702,\n",
       "        1.03144702]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9925 0.9925 ... 0.9438 0.9438</div><input id='attrs-e6454116-7fce-4d31-825a-9534f98de171' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e6454116-7fce-4d31-825a-9534f98de171' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f1cc7043-2450-4208-b7ec-f5b2676a02f7' class='xr-var-data-in' type='checkbox'><label for='data-f1cc7043-2450-4208-b7ec-f5b2676a02f7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.99248914, 0.99248914, 0.99248914, ..., 0.99248914, 0.99248914,\n",
       "        0.99248914],\n",
       "       [0.96215196, 0.96215196, 0.96215196, ..., 0.96215196, 0.96215196,\n",
       "        0.96215196],\n",
       "       [0.94141321, 0.94141321, 0.94141321, ..., 0.94141321, 0.94141321,\n",
       "        0.94141321],\n",
       "       [0.94381113, 0.94381113, 0.94381113, ..., 0.94381113, 0.94381113,\n",
       "        0.94381113]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 2 2 2 2 2 3 2 ... 1 2 2 3 3 1 3 2</div><input id='attrs-93e0974b-ed5b-4757-b63a-d2fa9c62907b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-93e0974b-ed5b-4757-b63a-d2fa9c62907b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1f50b766-18bb-43a1-afa7-ee4ae6d2f78d' class='xr-var-data-in' type='checkbox'><label for='data-1f50b766-18bb-43a1-afa7-ee4ae6d2f78d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2, 2, 2, ..., 2, 2, 2],\n",
       "       [2, 2, 2, ..., 2, 2, 2],\n",
       "       [2, 2, 2, ..., 2, 1, 2],\n",
       "       [2, 2, 2, ..., 1, 3, 2]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7e0846df-f80c-4152-806b-f249c99231c2' class='xr-section-summary-in' type='checkbox'  ><label for='section-7e0846df-f80c-4152-806b-f249c99231c2' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-f89249b5-d10d-42d4-b314-3a69b3b112f9' class='xr-index-data-in' type='checkbox'/><label for='index-f89249b5-d10d-42d4-b314-3a69b3b112f9' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-a115071d-e5a2-478e-9747-caf10ae63572' class='xr-index-data-in' type='checkbox'/><label for='index-a115071d-e5a2-478e-9747-caf10ae63572' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([   0,    1,    2,    3,    4,    5,    6,    7,    8,    9,\n",
       "       ...\n",
       "       4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=5000))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2d019715-113a-49ff-873b-8b65534f4bf4' class='xr-section-summary-in' type='checkbox'  checked><label for='section-2d019715-113a-49ff-873b-8b65534f4bf4' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:12.955550+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>23.16272521018982</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_observed_data35e1d142-be35-4ab8-a241-205988fa421c\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_observed_data35e1d142-be35-4ab8-a241-205988fa421c\" class = \"xr-section-summary\">observed_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 9kB\n",
       "Dimensions:           (likelihood_dim_0: 543)\n",
       "Coordinates:\n",
       "  * likelihood_dim_0  (likelihood_dim_0) int64 4kB 0 1 2 3 4 ... 539 540 541 542\n",
       "Data variables:\n",
       "    likelihood        (likelihood_dim_0) int64 4kB 1 0 1 1 1 1 1 ... 1 1 1 1 1 0\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:07:12.967662+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-d7d43e9f-5c81-4b10-8a22-f0074308f218' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-d7d43e9f-5c81-4b10-8a22-f0074308f218' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>likelihood_dim_0</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-bfc4ce50-eee2-4b33-8ef9-b062f42a0f27' class='xr-section-summary-in' type='checkbox'  checked><label for='section-bfc4ce50-eee2-4b33-8ef9-b062f42a0f27' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>likelihood_dim_0</span></div><div class='xr-var-dims'>(likelihood_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-a53210d7-accf-41e8-9ea9-3109b483e35c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a53210d7-accf-41e8-9ea9-3109b483e35c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0418c654-f6e9-487e-bb96-ca43efc9e992' class='xr-var-data-in' type='checkbox'><label for='data-0418c654-f6e9-487e-bb96-ca43efc9e992' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2c08866a-9fec-45dd-bb2d-53c2a48f65f1' class='xr-section-summary-in' type='checkbox'  checked><label for='section-2c08866a-9fec-45dd-bb2d-53c2a48f65f1' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>likelihood</span></div><div class='xr-var-dims'>(likelihood_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 0 1 1 1 1 1 1 ... 0 1 1 1 1 1 1 0</div><input id='attrs-32fc4f79-6b75-4c72-8f00-d3a830572cd7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-32fc4f79-6b75-4c72-8f00-d3a830572cd7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bfbff95f-1449-4745-a39f-8c41e2c68386' class='xr-var-data-in' type='checkbox'><label for='data-bfbff95f-1449-4745-a39f-8c41e2c68386' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1,\n",
       "       1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1,\n",
       "       1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-22944c80-0bc8-4fd7-b5b2-a1a87737ef4f' class='xr-section-summary-in' type='checkbox'  ><label for='section-22944c80-0bc8-4fd7-b5b2-a1a87737ef4f' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>likelihood_dim_0</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-23d5afef-d759-491e-83b9-21ed11b95ec3' class='xr-index-data-in' type='checkbox'/><label for='index-23d5afef-d759-491e-83b9-21ed11b95ec3' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;likelihood_dim_0&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-40b648ca-94d0-4517-9eff-777d5808b97b' class='xr-section-summary-in' type='checkbox'  checked><label for='section-40b648ca-94d0-4517-9eff-777d5808b97b' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:12.967662+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_constant_data24f5bd11-4ffb-4541-83c5-f477a41661d1\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_constant_data24f5bd11-4ffb-4541-83c5-f477a41661d1\" class = \"xr-section-summary\">constant_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 7kB\n",
       "Dimensions:                 (percentCoherence_dim_0: 543)\n",
       "Coordinates:\n",
       "  * percentCoherence_dim_0  (percentCoherence_dim_0) int64 4kB 0 1 2 ... 541 542\n",
       "Data variables:\n",
       "    percentCoherence        (percentCoherence_dim_0) int32 2kB 10 40 ... 40 10\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:07:12.972057+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-09889321-38e0-4b22-99ec-830963191c81' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-09889321-38e0-4b22-99ec-830963191c81' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>percentCoherence_dim_0</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-f3402467-306f-49d1-b0bb-4dccc7075196' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f3402467-306f-49d1-b0bb-4dccc7075196' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>percentCoherence_dim_0</span></div><div class='xr-var-dims'>(percentCoherence_dim_0)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-fab65f13-e513-44e4-8fc0-b20c166458a9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fab65f13-e513-44e4-8fc0-b20c166458a9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4fe1fdac-7a9b-4ab1-b83e-e5c9d4a5517f' class='xr-var-data-in' type='checkbox'><label for='data-4fe1fdac-7a9b-4ab1-b83e-e5c9d4a5517f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-956e8b63-a16b-4097-b22b-20efc557b7a1' class='xr-section-summary-in' type='checkbox'  checked><label for='section-956e8b63-a16b-4097-b22b-20efc557b7a1' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>percentCoherence</span></div><div class='xr-var-dims'>(percentCoherence_dim_0)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>10 40 40 10 10 ... 10 10 10 40 10</div><input id='attrs-50ada375-4e25-468a-bbc3-b872e90ff860' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-50ada375-4e25-468a-bbc3-b872e90ff860' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-59c3bace-bb4f-4a95-8839-1fd220ecd537' class='xr-var-data-in' type='checkbox'><label for='data-59c3bace-bb4f-4a95-8839-1fd220ecd537' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([10, 40, 40, 10, 10, 40, 10, 40, 10, 40, 40, 40, 40, 10, 40, 10, 10,\n",
       "       10, 40, 40, 10, 40, 40, 10, 40, 40, 10, 40, 40, 10, 40, 40, 40, 10,\n",
       "       40, 40, 40, 40, 10, 10, 10, 40, 40, 10, 40, 40, 10, 40, 40, 10, 40,\n",
       "       10, 40, 40, 40, 10, 40, 10, 40, 10, 40, 40, 40, 10, 40, 10, 10, 40,\n",
       "       10, 40, 10, 10, 40, 40, 40, 40, 10, 40, 40, 10, 10, 40, 10, 40, 40,\n",
       "       10, 10, 10, 10, 40, 40, 10, 40, 40, 40, 10, 40, 10, 40, 10, 40, 40,\n",
       "       10, 40, 10, 40, 10, 40, 10, 40, 10, 10, 40, 40, 40, 10, 10, 40, 40,\n",
       "       10, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 10, 40, 10,\n",
       "       40, 40, 40, 40, 10, 40, 40, 40, 10, 40, 40, 40, 10, 40, 10, 40, 40,\n",
       "       10, 40, 10, 10, 40, 40, 10, 40, 10, 40, 10, 10, 40, 10, 40, 10, 10,\n",
       "       40, 10, 10, 10, 40, 10, 40, 10, 40, 10, 40, 10, 10, 10, 40, 40, 40,\n",
       "       40, 40, 40, 10, 10, 40, 40, 10, 10, 40, 40, 10, 40, 40, 40, 10, 10,\n",
       "       40, 40, 40, 10, 40, 40, 10, 40, 40, 40, 10, 40, 40, 10, 40, 10, 10,\n",
       "       40, 40, 40, 40, 40, 10, 10, 40, 40, 40, 40, 10, 10, 10, 40, 10, 10,\n",
       "       40, 10, 10, 10, 10, 40, 40, 10, 10, 10, 40, 10, 40, 10, 40, 40, 40,\n",
       "       10, 40, 40, 10, 10, 10, 40, 10, 40, 10, 40, 40, 10, 10, 10, 10, 10,\n",
       "       10, 40, 10, 40, 10, 10, 10, 40, 40, 40, 10, 10, 10, 10, 10, 40, 10,\n",
       "       40, 40, 40, 40, 10, 40, 10, 10, 10, 40, 10, 10, 40, 10, 10, 40, 40,\n",
       "       10, 10, 40, 40, 10, 40, 10, 40, 10, 10, 10, 10, 10, 10, 10, 10, 10,\n",
       "       40, 40, 40, 10, 10, 10, 40, 40, 10, 40, 40, 40, 40, 10, 40, 10, 10,\n",
       "       10, 40, 10, 40, 10, 10, 40, 10, 10, 10, 10, 10, 40, 10, 40, 40, 10,\n",
       "       10, 40, 40, 40, 40, 40, 40, 40, 10, 10, 10, 40, 40, 10, 10, 40, 40,\n",
       "       40, 10, 40, 40, 10, 10, 10, 10, 10, 40, 40, 10, 40, 40, 10, 40, 10,\n",
       "       10, 40, 40, 40, 40, 10, 40, 40, 40, 40, 40, 40, 40, 40, 10, 10, 10,\n",
       "       10, 10, 40, 40, 40, 40, 10, 40, 40, 40, 40, 10, 10, 10, 10, 10, 10,\n",
       "       40, 10, 10, 40, 10, 10, 40, 10, 10, 40, 10, 10, 40, 40, 10, 10, 40,\n",
       "       40, 10, 40, 10, 40, 10, 40, 40, 10, 10, 40, 40, 40, 10, 10, 40, 40,\n",
       "       10, 40, 40, 40, 40, 40, 40, 40, 40, 10, 10, 40, 10, 10, 10, 10, 10,\n",
       "       10, 40, 10, 40, 40, 40, 40, 10, 40, 40, 10, 10, 40, 10, 10, 10, 10,\n",
       "       40, 10, 10, 40, 40, 10, 10, 10, 10, 10, 40, 10, 10, 40, 10, 10, 10,\n",
       "       10, 40, 40, 10, 40, 40, 10, 10, 40, 10, 40, 40, 40, 10, 40, 40, 10,\n",
       "       40, 40, 10, 10, 40, 10, 40, 10, 10, 10, 40, 10, 10, 10, 40, 10],\n",
       "      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9b557ce8-030a-401f-a906-c79980f9aea3' class='xr-section-summary-in' type='checkbox'  ><label for='section-9b557ce8-030a-401f-a906-c79980f9aea3' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>percentCoherence_dim_0</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-6ddd61eb-d5f4-4840-afcc-cfd8897a205b' class='xr-index-data-in' type='checkbox'/><label for='index-6ddd61eb-d5f4-4840-afcc-cfd8897a205b' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;percentCoherence_dim_0&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-77e49388-38e7-4778-92d8-7fe2b0bb4d0e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-77e49388-38e7-4778-92d8-7fe2b0bb4d0e' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:12.972057+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "              </ul>\n",
       "            </div>\n",
       "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-sections.group-sections {\n",
       "  grid-template-columns: auto;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2 {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       ".xr-wrap{width:700px!important;} </style>"
      ],
      "text/plain": [
       "Inference data with groups:\n",
       "\t> posterior\n",
       "\t> sample_stats\n",
       "\t> observed_data\n",
       "\t> constant_data"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "log_model1_trace"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": false,
    "id": "3AD28374DEB240C389153FF86F4BE4F4",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "fragment"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/9C174686EFA64C59836C584CAB424095/so0eg93y9k.png\">"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#对于一次抽样，可以绘制出一条曲线，结合循环绘制出50条曲线\n",
    "ys = log_model1_trace.posterior[\"pi\"].stack(sample=(\"chain\", \"draw\"))\n",
    "for i in range(100):\n",
    "    sns.lineplot(x = log_model1_trace.constant_data[\"percentCoherence\"],\n",
    "            y = ys[:,i], \n",
    "            c=\"grey\",\n",
    "            alpha=0.4)\n",
    "    \n",
    "#设置x、y轴标题和总标题    \n",
    "plt.xlabel(\"percentCoherence\",\n",
    "           fontsize=12)\n",
    "plt.ylabel(\"probability of correct\",\n",
    "           fontsize=12)\n",
    "plt.suptitle(\"100 posterior plausible models\",\n",
    "           fontsize=14)\n",
    "sns.despine()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "31071C1ADE2842868327B7A791673917",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 对新数据进行预测&分类  \n",
    "\n",
    "* 除了对当前数据结果做出解释，也可以使用当前的参数预测值，对新数据做出预测  \n",
    "\n",
    "* 现在假设有一批新数据，那么被试在“percentCoherence”为 40的情况下，对新数据进行正确判断的概率是多少？\n",
    "\n",
    "* 即当 $X_{i}=40$ 时对新数据进行预测和分类\n",
    "\n",
    "* 由于例子中的自变量使用了treatment coding的编码方式，所以$X_{i}=40$ 应对应为$X_{i}=1$\n",
    "  \n",
    "  \n",
    "$$  \n",
    "Y | \\beta_0, \\beta_1 \\sim \\text{Bern}(\\pi) \\;\\; \\text{ with } \\;\\; \\log\\left( \\frac{\\pi}{1-\\pi}\\right) = \\beta_0 + \\beta_1 * 1 \n",
    "$$  \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "id": "B842C18285E74602A90F51C84734C62A",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "odds = log_model1_trace.posterior[\"beta_0\"]+ log_model1_trace.posterior[\"beta_1\"] * 1\n",
    "pi = inv_logit(odds)\n",
    "Y_hat = np.random.binomial(n=1, p=pi)[0]\n",
    "\n",
    "# 统计其中0和1的个数，并除以总数，得到0和1对应的比例值\n",
    "y_pred_freq = np.bincount(Y_hat)/len(Y_hat)\n",
    "\n",
    "# 绘制柱状图\n",
    "bars = plt.bar([0, 1], y_pred_freq, color=\"#70AD47\")\n",
    "\n",
    "# 用于在柱状图上标明比例值\n",
    "for bar, freq in zip(bars, y_pred_freq):\n",
    "    plt.text(bar.get_x() + bar.get_width() / 2, bar.get_height(), f\"{freq:.2f}\", ha='center', va='bottom')\n",
    "\n",
    "#对刻度、标题、坐标轴标题进行设置\n",
    "plt.xticks([0, 1])\n",
    "plt.suptitle(\"Out-of-sample prediction(X=1)\")\n",
    "plt.xlabel(\"correct\")\n",
    "plt.ylabel(\"proportion\")\n",
    "sns.despine()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "2A6BFF14C9124F668BA7AF362174CEE5",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 评估分类结果  \n",
    "\n",
    "* $Y$为每个自变量对应的二分因变量，$\\hat{Y}$为对应的后验分类结果  \n",
    "* 我们可以使用**混淆矩阵**(confusion matrix)来对真实结果与分类结果进行比较和评估  \n",
    "\n",
    "    * a: 真阴性（True Negative，TN）表示被正确预测为负例的样本数  \n",
    "    * b: 假阳性（False Positive，FP）表示被错误预测为正例的样本数  \n",
    "    * c: 假阴性（False Negative，FN）表示被错误预测为负例的样本数  \n",
    "    * d: 真阳性（True Positive，TP）表示被正确预测为正例的样本数  \n",
    "\n",
    "|  | $\\hat{Y} = 0$    | $\\hat{Y} = 1$ |  \n",
    "| --------  | -------- | -------- |  \n",
    "| $Y=0$ | a | b |  \n",
    "| $Y=1$ | c | d |"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "387B11A35E6F454395B5AC89E38C4BE5",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "在二分类问题中，准确性（Accuracy）、敏感性（Sensitivity）和特异性（Specificity）是常用的评估指标，可以通过在得到 a b c d 的数量之后进行计算：  \n",
    "\n",
    "1. **准确性(accuracy)** ：准确性是指分类模型正确预测的样本数占总样本数的比例。  \n",
    "* 准确性衡量了模型总体的分类正确率，数值越高表示模型的整体性能越好。  \n",
    "\n",
    "$$  \n",
    "\\text{accuracy} = \\frac{(TP + TN)}{(TP + TN + FP + FN)} =\\frac{a + d}{a + b + c + d}  \n",
    "$$  \n",
    "\n",
    "2. **敏感性(sensitivity)** ：敏感性也称为召回率（Recall），它是指在所有实际为正例的样本中，被正确预测为正例的比例。  \n",
    "* 敏感性衡量了模型对于正例的识别能力，数值越高表示模型对于正例的预测能力越好。  \n",
    " $$  \n",
    " \\text{sensitivity} = \\frac{TP}{(TP + FN)} = \\frac{d}{c + d}  \n",
    " $$  \n",
    "\n",
    "3. **特异性(specificity)** ：特异性是指在所有实际为负例的样本中，被正确预测为负例的比例。  \n",
    "* 特异性衡量了模型对于负例的识别能力，数值越高表示模型对于负例的预测能力越好。  \n",
    " $$  \n",
    " \\text{specificity} = \\frac{TN}{(TN + FP)} = \\frac{a}{a + b}  \n",
    " $$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false,
    "id": "6F024395CC1E48A5A66713693CCF468D",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>subject</th>\n",
       "      <th>percentCoherence</th>\n",
       "      <th>correct</th>\n",
       "      <th>pi</th>\n",
       "      <th>prediction</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>0.685881</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>31727</td>\n",
       "      <td>40</td>\n",
       "      <td>0</td>\n",
       "      <td>0.926119</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>31727</td>\n",
       "      <td>40</td>\n",
       "      <td>1</td>\n",
       "      <td>0.926119</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>0.685881</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>0.685881</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1095</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>0.685881</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1097</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>0.685881</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1098</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>0.685881</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1099</th>\n",
       "      <td>31727</td>\n",
       "      <td>40</td>\n",
       "      <td>1</td>\n",
       "      <td>0.926119</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1105</th>\n",
       "      <td>31727</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>0.685881</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>543 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      subject  percentCoherence  correct        pi  prediction\n",
       "0       31727                10        1  0.685881           1\n",
       "1       31727                40        0  0.926119           1\n",
       "3       31727                40        1  0.926119           1\n",
       "6       31727                10        1  0.685881           1\n",
       "7       31727                10        1  0.685881           0\n",
       "...       ...               ...      ...       ...         ...\n",
       "1095    31727                10        1  0.685881           1\n",
       "1097    31727                10        1  0.685881           0\n",
       "1098    31727                10        1  0.685881           1\n",
       "1099    31727                40        1  0.926119           1\n",
       "1105    31727                10        0  0.685881           1\n",
       "\n",
       "[543 rows x 5 columns]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ys = log_model1_trace.posterior[\"pi\"].stack(sample=(\"chain\", \"draw\"))\n",
    "df_clean[\"pi\"] = ys.mean(dim=\"sample\").values\n",
    "\n",
    "predictions = []\n",
    "for i in df_clean[\"pi\"]:\n",
    "    prediction = np.random.binomial(n=1, p=i)\n",
    "    predictions.append(prediction)\n",
    "\n",
    "df_clean[\"prediction\"] = predictions\n",
    "df_clean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false,
    "id": "8F006448972B427F825E64BA73800CBB",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>$\\hat{Y} = 0$</th>\n",
       "      <th>$\\hat{Y} = 1$</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>$Y=0$</th>\n",
       "      <td>30</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>$Y=1$</th>\n",
       "      <td>69</td>\n",
       "      <td>372</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       $\\hat{Y} = 0$  $\\hat{Y} = 1$\n",
       "$Y=0$             30             72\n",
       "$Y=1$             69            372"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def calculate_contingency_table(df, y=\"correct\", yhat=\"prediction\"):\n",
    "    \n",
    "    # 计算各种情况的数量\n",
    "    TN = ((df[y] == 0) & (df[yhat] == 0)).sum()  # 真阴性\n",
    "    FP = ((df[y] == 0) & (df[yhat] == 1)).sum()  # 假阳性\n",
    "    FN = ((df[y] == 1) & (df[yhat] == 0)).sum()  # 假阴性\n",
    "    TP = ((df[y] == 1) & (df[yhat] == 1)).sum()  # 真阳性\n",
    "    \n",
    "    # 创建一个DataFrame来表示列联表\n",
    "    contingency_df = pd.DataFrame({\n",
    "        '$\\\\hat{Y} = 0$': [TN, FN],\n",
    "        '$\\\\hat{Y} = 1$': [FP, TP]\n",
    "    }, index=['$Y=0$', '$Y=1$'])\n",
    "    \n",
    "    return (TN, FP, TN, FN), contingency_df\n",
    "\n",
    "# 计算两个 percentCoherence 值下的列联表\n",
    "(true_positive, false_positive, true_negative, false_negative), contingency_table = calculate_contingency_table(df_clean)\n",
    "\n",
    "contingency_table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false,
    "id": "D3E5D5F72CE6484E8E7C5D6DFBDBB39F",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True Positive: 30\n",
      "False Positive: 72\n",
      "True Negative: 30\n",
      "False Negative: 69\n",
      "准确性: 0.29850746268656714\n",
      "敏感性: 0.30303030303030304\n",
      "特异性: 0.29411764705882354\n"
     ]
    }
   ],
   "source": [
    "# 定义计算指标函数\n",
    "def calculate_metrics(TP, FP, TN, FN):\n",
    "    # 计算准确性\n",
    "    accuracy = (TP + TN) / (TP + TN + FP + FN)\n",
    "\n",
    "    # 计算敏感性\n",
    "    sensitivity = TP / (TP + FN) if (TP + FN) != 0 else 0\n",
    "\n",
    "    # 计算特异性\n",
    "    specificity = TN / (TN + FP) if (TN + FP) != 0 else 0\n",
    "\n",
    "    return accuracy, sensitivity, specificity\n",
    "\n",
    "# 计算指标\n",
    "accuracy, sensitivity, specificity = calculate_metrics(true_positive, false_positive, true_negative, false_negative)\n",
    "\n",
    "# 打印结果\n",
    "print(f\"True Positive: {true_positive}\")\n",
    "print(f\"False Positive: {false_positive}\")\n",
    "print(f\"True Negative: {true_negative}\")\n",
    "print(f\"False Negative: {false_negative}\")\n",
    "print(f\"准确性: {accuracy}\")\n",
    "print(f\"敏感性: {sensitivity}\")\n",
    "print(f\"特异性: {specificity}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "BFA135D7EA6B4A94B9AE64BADBF8258E",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 总结  \n",
    "\n",
    "本节课学习了如何通过广义线性模型(Generalized linear model, GLM)拟合二元决策变量。  \n",
    "\n",
    "重点在于：  \n",
    "- 了解二元决策变量适合的分布，伯努利(Bernoulli)分布。  \n",
    "- 了解如何通过概率、发生率和链接函数(link function)来表示线性模型。  \n",
    "- 学习模型评估指标：准确性（Accuracy）、敏感性（Sensitivity）和特异性（Specificity）。  \n",
    "![Image Name](https://cdn.kesci.com/upload/image/rkz1ehen1l.png?imageView2/0/w/720/h/960)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "9ACA4565AB194DBE9FFFA083E135C4BD",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 补充：使用bambi建立logistic回归模型  \n",
    "\n",
    "这里我们使用 bambi 提供的默认先验来构建模型。 可以看到：  \n",
    "* 先验为：  \n",
    "    \n",
    "    Intercept ~ Normal(mu: 0.0, sigma: 3.6269)  \n",
    "    \n",
    "    C(percentCoherence) ~ Normal(mu: 0.0, sigma: 5.0062)  \n",
    "* 模型分布为：bernoulli  \n",
    "* 链接函数为：p = logit  \n",
    "* `C(percentCoherence)` 代表将 percentCoherence 变量编码为分类变量 (categorical variable)。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false,
    "id": "B7418E0BD0F34D8BAC4946D6D9DA075F",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "def inv_logit(log_odds):\n",
    "    return np.exp(log_odds) / (1 + np.exp(log_odds))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "collapsed": false,
    "id": "22B3DA9121C64580A3EFE47854D78A8A",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "       Formula: correct ~ C(percentCoherence)\n",
       "        Family: bernoulli\n",
       "          Link: p = logit\n",
       "  Observations: 543\n",
       "        Priors: \n",
       "    target = p\n",
       "        Common-level effects\n",
       "            Intercept ~ Normal(mu: 0.0, sigma: 3.6269)\n",
       "            C(percentCoherence) ~ Normal(mu: 0.0, sigma: 5.0062)"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import bambi as bmb\n",
    "\n",
    "bambi_logit = bmb.Model(\"correct ~ C(percentCoherence)\", df_clean, family=\"bernoulli\")\n",
    "bambi_logit"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "0E44A66CF77444CE9178A04501890DEA",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "**模型拟合**  \n",
    "\n",
    "这里使用 bambi 提供的默认拟合设置。  \n",
    "* 包括 4 条 MCMC 链，每个链 2000 个迭代，其中前 1000 个为 burn-in 阶段。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "collapsed": false,
    "id": "043A00704D954C9BA5E01F1B755A96AA",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Sampling 4 chains, 0 divergences <span style=\"color: #008000; text-decoration-color: #008000\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span> <span style=\"color: #800080; text-decoration-color: #800080\">100%</span> <span style=\"color: #008080; text-decoration-color: #008080\">0:00:00</span> / <span style=\"color: #808000; text-decoration-color: #808000\">0:00:09</span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "Sampling 4 chains, 0 divergences \u001b[32m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[36m0:00:00\u001b[0m / \u001b[33m0:00:09\u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ],
      "text/plain": []
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 9 seconds.\n"
     ]
    }
   ],
   "source": [
    "model_fitted = bambi_logit.fit(random_seed=84735)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false,
    "id": "42FA515FCE4A43C7A23FE3958D488C52",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div>\n",
       "              <div class='xr-header'>\n",
       "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
       "              </div>\n",
       "              <ul class=\"xr-sections group-sections\">\n",
       "              \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_posteriora2128405-7b94-4d16-b432-b22492f9e01c\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_posteriora2128405-7b94-4d16-b432-b22492f9e01c\" class = \"xr-section-summary\">posterior</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 72kB\n",
       "Dimensions:                  (chain: 4, draw: 1000, C(percentCoherence)_dim: 1)\n",
       "Coordinates:\n",
       "  * chain                    (chain) int64 32B 0 1 2 3\n",
       "  * draw                     (draw) int64 8kB 0 1 2 3 4 ... 995 996 997 998 999\n",
       "  * C(percentCoherence)_dim  (C(percentCoherence)_dim) &lt;U2 8B &#x27;40&#x27;\n",
       "Data variables:\n",
       "    C(percentCoherence)      (chain, draw, C(percentCoherence)_dim) float64 32kB ...\n",
       "    Intercept                (chain, draw) float64 32kB 0.5589 0.9487 ... 0.7836\n",
       "Attributes:\n",
       "    created_at:                  2024-12-05T07:07:41.514887+00:00\n",
       "    arviz_version:               0.19.0\n",
       "    inference_library:           pymc\n",
       "    inference_library_version:   5.16.2\n",
       "    sampling_time:               9.07543158531189\n",
       "    tuning_steps:                1000\n",
       "    modeling_interface:          bambi\n",
       "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-08df30b7-b891-423c-8bcf-e08889b2f684' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-08df30b7-b891-423c-8bcf-e08889b2f684' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 1000</li><li><span class='xr-has-index'>C(percentCoherence)_dim</span>: 1</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-11d82e09-0d50-4fb5-8a2c-5865bd85c1a0' class='xr-section-summary-in' type='checkbox'  checked><label for='section-11d82e09-0d50-4fb5-8a2c-5865bd85c1a0' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-e7a71e96-46f7-4f8f-a683-a987b4de843e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e7a71e96-46f7-4f8f-a683-a987b4de843e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2de1b10b-ffd2-4ef2-b492-83a74046ca87' class='xr-var-data-in' type='checkbox'><label for='data-2de1b10b-ffd2-4ef2-b492-83a74046ca87' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 995 996 997 998 999</div><input id='attrs-98b44da5-a8da-47be-bc22-0c9ad6f98f5d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-98b44da5-a8da-47be-bc22-0c9ad6f98f5d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-becbc807-fbf7-4464-8218-d60ce72852c7' class='xr-var-data-in' type='checkbox'><label for='data-becbc807-fbf7-4464-8218-d60ce72852c7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 997, 998, 999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>C(percentCoherence)_dim</span></div><div class='xr-var-dims'>(C(percentCoherence)_dim)</div><div class='xr-var-dtype'>&lt;U2</div><div class='xr-var-preview xr-preview'>&#x27;40&#x27;</div><input id='attrs-77f211d0-5a6e-44fc-a06a-f6e042ebeec7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-77f211d0-5a6e-44fc-a06a-f6e042ebeec7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-818cc068-4f1e-45bd-b263-2be0adc2c374' class='xr-var-data-in' type='checkbox'><label for='data-818cc068-4f1e-45bd-b263-2be0adc2c374' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;40&#x27;], dtype=&#x27;&lt;U2&#x27;)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ce661f50-e35a-488b-b2c8-ff989d821972' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ce661f50-e35a-488b-b2c8-ff989d821972' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>C(percentCoherence)</span></div><div class='xr-var-dims'>(chain, draw, C(percentCoherence)_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.095 1.527 1.508 ... 1.278 1.22</div><input id='attrs-5d5af3fc-1548-4635-afe3-423aee9c24b7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5d5af3fc-1548-4635-afe3-423aee9c24b7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1c76db00-46e9-47f4-99f5-ec64519198cb' class='xr-var-data-in' type='checkbox'><label for='data-1c76db00-46e9-47f4-99f5-ec64519198cb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[2.09485044],\n",
       "        [1.52670543],\n",
       "        [1.50846535],\n",
       "        ...,\n",
       "        [1.4392917 ],\n",
       "        [1.8426769 ],\n",
       "        [1.8426769 ]],\n",
       "\n",
       "       [[2.27334382],\n",
       "        [2.27334382],\n",
       "        [1.89643526],\n",
       "        ...,\n",
       "        [1.88599335],\n",
       "        [2.10912089],\n",
       "        [1.78041005]],\n",
       "\n",
       "       [[1.95418764],\n",
       "        [2.02519484],\n",
       "        [2.15939834],\n",
       "        ...,\n",
       "        [2.00631983],\n",
       "        [1.55018266],\n",
       "        [2.29408609]],\n",
       "\n",
       "       [[1.67027792],\n",
       "        [1.5587681 ],\n",
       "        [1.57459928],\n",
       "        ...,\n",
       "        [1.27865309],\n",
       "        [1.27843827],\n",
       "        [1.22038445]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>Intercept</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5589 0.9487 ... 0.8531 0.7836</div><input id='attrs-4fd21ca3-c83c-40ae-8882-bdb77a668d73' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4fd21ca3-c83c-40ae-8882-bdb77a668d73' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-02b2bf9a-b27e-49de-b0f5-368a60116bbf' class='xr-var-data-in' type='checkbox'><label for='data-02b2bf9a-b27e-49de-b0f5-368a60116bbf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.55894625, 0.94870701, 0.85657878, ..., 0.99067243, 0.73959972,\n",
       "        0.73959972],\n",
       "       [0.69014221, 0.69014221, 0.82096736, ..., 0.89318507, 0.68953898,\n",
       "        0.84619115],\n",
       "       [0.65369887, 0.61858906, 0.9312787 , ..., 0.53588785, 1.02279792,\n",
       "        0.59667896],\n",
       "       [0.8381225 , 0.66014793, 0.90385408, ..., 0.99242829, 0.85311797,\n",
       "        0.78359161]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-cf5c49fc-1116-4dad-83aa-261ae4b6de18' class='xr-section-summary-in' type='checkbox'  ><label for='section-cf5c49fc-1116-4dad-83aa-261ae4b6de18' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-be939d93-befa-4281-8603-b729d582c1ac' class='xr-index-data-in' type='checkbox'/><label for='index-be939d93-befa-4281-8603-b729d582c1ac' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-0853c56d-018e-476b-ba29-b987288987a4' class='xr-index-data-in' type='checkbox'/><label for='index-0853c56d-018e-476b-ba29-b987288987a4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       990, 991, 992, 993, 994, 995, 996, 997, 998, 999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=1000))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>C(percentCoherence)_dim</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-9c5ae75e-dff3-43f2-8ff4-49cd5a294ed6' class='xr-index-data-in' type='checkbox'/><label for='index-9c5ae75e-dff3-43f2-8ff4-49cd5a294ed6' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;40&#x27;], dtype=&#x27;object&#x27;, name=&#x27;C(percentCoherence)_dim&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9499c9ad-b006-43f6-8355-242bd8f9baf1' class='xr-section-summary-in' type='checkbox'  checked><label for='section-9499c9ad-b006-43f6-8355-242bd8f9baf1' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:41.514887+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>9.07543158531189</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_sample_stats0535b76a-bac3-457e-8376-622d4063fda6\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_sample_stats0535b76a-bac3-457e-8376-622d4063fda6\" class = \"xr-section-summary\">sample_stats</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 496kB\n",
       "Dimensions:                (chain: 4, draw: 1000)\n",
       "Coordinates:\n",
       "  * chain                  (chain) int64 32B 0 1 2 3\n",
       "  * draw                   (draw) int64 8kB 0 1 2 3 4 5 ... 995 996 997 998 999\n",
       "Data variables: (12/17)\n",
       "    acceptance_rate        (chain, draw) float64 32kB 0.5868 0.9333 ... 0.8269\n",
       "    diverging              (chain, draw) bool 4kB False False ... False False\n",
       "    energy                 (chain, draw) float64 32kB 243.9 242.5 ... 243.6\n",
       "    energy_error           (chain, draw) float64 32kB 0.5966 -0.2811 ... 0.1901\n",
       "    index_in_trajectory    (chain, draw) int64 32kB 1 -1 -3 -2 1 ... -3 1 -1 -1\n",
       "    largest_eigval         (chain, draw) float64 32kB nan nan nan ... nan nan\n",
       "    ...                     ...\n",
       "    process_time_diff      (chain, draw) float64 32kB 0.0007684 ... 0.0004692\n",
       "    reached_max_treedepth  (chain, draw) bool 4kB False False ... False False\n",
       "    smallest_eigval        (chain, draw) float64 32kB nan nan nan ... nan nan\n",
       "    step_size              (chain, draw) float64 32kB 1.074 1.074 ... 0.9051\n",
       "    step_size_bar          (chain, draw) float64 32kB 0.8999 0.8999 ... 0.9635\n",
       "    tree_depth             (chain, draw) int64 32kB 2 2 3 2 1 3 ... 2 1 2 1 2 1\n",
       "Attributes:\n",
       "    created_at:                  2024-12-05T07:07:41.541010+00:00\n",
       "    arviz_version:               0.19.0\n",
       "    inference_library:           pymc\n",
       "    inference_library_version:   5.16.2\n",
       "    sampling_time:               9.07543158531189\n",
       "    tuning_steps:                1000\n",
       "    modeling_interface:          bambi\n",
       "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-4e487f3a-7ae6-4380-a3b1-7f5b70dfb808' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-4e487f3a-7ae6-4380-a3b1-7f5b70dfb808' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 1000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-a297f35b-a0d7-4c92-96ac-7ffa67714fb9' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a297f35b-a0d7-4c92-96ac-7ffa67714fb9' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-34c27b37-12a4-4cca-9388-e78fd0e1f1a9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-34c27b37-12a4-4cca-9388-e78fd0e1f1a9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-aa942c21-d15f-4f35-aecd-04a9c692a4fd' class='xr-var-data-in' type='checkbox'><label for='data-aa942c21-d15f-4f35-aecd-04a9c692a4fd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 995 996 997 998 999</div><input id='attrs-b23dee94-5328-4793-afd9-b69a3e9b32c1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b23dee94-5328-4793-afd9-b69a3e9b32c1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c150109a-c657-4ed6-91a9-32605ccdeb0d' class='xr-var-data-in' type='checkbox'><label for='data-c150109a-c657-4ed6-91a9-32605ccdeb0d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 997, 998, 999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7c530f94-3ae5-4925-a774-527330f644dd' class='xr-section-summary-in' type='checkbox'  ><label for='section-7c530f94-3ae5-4925-a774-527330f644dd' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5868 0.9333 0.9418 ... 1.0 0.8269</div><input id='attrs-3ba05dc1-37d7-42cf-88db-09003f97d0f2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3ba05dc1-37d7-42cf-88db-09003f97d0f2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f5c204ec-6a64-4f5a-874a-32dfe646c558' class='xr-var-data-in' type='checkbox'><label for='data-f5c204ec-6a64-4f5a-874a-32dfe646c558' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.58677678, 0.93334609, 0.94177475, ..., 0.82852062, 0.99321359,\n",
       "        0.36124276],\n",
       "       [0.80365969, 0.05145746, 0.93362813, ..., 0.83195937, 1.        ,\n",
       "        1.        ],\n",
       "       [0.46638066, 0.81778439, 0.77372526, ..., 0.43221648, 0.75933654,\n",
       "        0.78967243],\n",
       "       [0.96357156, 0.72360878, 1.        , ..., 0.82536457, 1.        ,\n",
       "        0.82686273]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-e0ae5bd1-d049-46d3-9be1-23ee0f7c6b82' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e0ae5bd1-d049-46d3-9be1-23ee0f7c6b82' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-899358d4-57ee-45d6-ad33-dd26729329c8' class='xr-var-data-in' type='checkbox'><label for='data-899358d4-57ee-45d6-ad33-dd26729329c8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>243.9 242.5 242.2 ... 243.0 243.6</div><input id='attrs-6bacd43f-6222-4cf5-b718-12b52d5765e6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6bacd43f-6222-4cf5-b718-12b52d5765e6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ddc41bc3-144b-4374-94fc-4f48a797f78d' class='xr-var-data-in' type='checkbox'><label for='data-ddc41bc3-144b-4374-94fc-4f48a797f78d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[243.91222342, 242.49815914, 242.18171471, ..., 242.5549396 ,\n",
       "        241.16366852, 242.70880957],\n",
       "       [243.21504166, 244.98616487, 242.5310653 , ..., 241.37973784,\n",
       "        241.52556676, 241.30277949],\n",
       "       [243.27239539, 242.0856872 , 244.14577353, ..., 242.16569912,\n",
       "        243.50236475, 243.76689222],\n",
       "       [241.752694  , 242.33428079, 241.76140111, ..., 242.65773266,\n",
       "        242.96898315, 243.63996241]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5966 -0.2811 ... -0.2561 0.1901</div><input id='attrs-29dfb69b-c765-4fe9-bef4-bbfb4e72baf2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-29dfb69b-c765-4fe9-bef4-bbfb4e72baf2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4b5053de-a8c0-49d9-b9f8-6f7ae6b0cb52' class='xr-var-data-in' type='checkbox'><label for='data-4b5053de-a8c0-49d9-b9f8-6f7ae6b0cb52' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.5965935 , -0.28111282, -0.2416552 , ...,  0.18983711,\n",
       "        -0.52453929,  0.        ],\n",
       "       [-0.02824713,  0.        , -0.23670923, ...,  0.3047411 ,\n",
       "        -0.11286848, -0.12352879],\n",
       "       [ 0.        ,  0.15223961,  0.29205514, ...,  0.8388287 ,\n",
       "         0.09084187, -0.23840771],\n",
       "       [-0.10502414,  0.23927709, -0.12595442, ...,  0.19193008,\n",
       "        -0.25608545,  0.19011658]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 -1 -3 -2 1 -1 ... -1 -3 1 -1 -1</div><input id='attrs-7ced1457-ff60-4ee7-b653-7eff9bbd53d6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7ced1457-ff60-4ee7-b653-7eff9bbd53d6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6db58188-8b48-4e8f-b144-2233e9b05c38' class='xr-var-data-in' type='checkbox'><label for='data-6db58188-8b48-4e8f-b144-2233e9b05c38' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 1, -1, -3, ..., -3, -3,  0],\n",
       "       [-2,  0, -2, ..., -5,  1, -2],\n",
       "       [ 0, -3,  2, ...,  1, -2, -2],\n",
       "       [-1,  2, -2, ...,  1, -1, -1]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-87c8ae30-ce60-445b-aff1-0f425441b500' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-87c8ae30-ce60-445b-aff1-0f425441b500' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-267ff217-99a8-415f-96fc-4ea980b1aab6' class='xr-var-data-in' type='checkbox'><label for='data-267ff217-99a8-415f-96fc-4ea980b1aab6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-242.0 -241.2 ... -242.3 -243.5</div><input id='attrs-ebb71cce-b65e-4676-8a55-984856c94844' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ebb71cce-b65e-4676-8a55-984856c94844' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4976f900-8707-464c-b4ff-6d37134ffa2b' class='xr-var-data-in' type='checkbox'><label for='data-4976f900-8707-464c-b4ff-6d37134ffa2b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-241.99322296, -241.19781819, -240.83083213, ..., -241.68649032,\n",
       "        -240.49824882, -240.49824882],\n",
       "       [-242.32786779, -242.32786779, -240.80446227, ..., -241.34844532,\n",
       "        -241.33980315, -240.62963435],\n",
       "       [-240.94679789, -241.30740637, -243.71396739, ..., -242.1502334 ,\n",
       "        -242.00293787, -242.58132434],\n",
       "       [-240.50593548, -241.8324827 , -240.84463185, ..., -242.29389965,\n",
       "        -242.25121367, -243.50164965]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8163 -0.2811 ... -0.5635 0.1901</div><input id='attrs-526bb146-2d49-4edb-a70e-2bf270c33dea' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-526bb146-2d49-4edb-a70e-2bf270c33dea' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dc6596ed-8f0d-4af0-a06e-5f2f245deaa1' class='xr-var-data-in' type='checkbox'><label for='data-dc6596ed-8f0d-4af0-a06e-5f2f245deaa1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.81629248, -0.28111282,  0.25553993, ...,  0.30209842,\n",
       "        -0.52658381,  1.80131445],\n",
       "       [ 0.74299758,  2.9669998 , -0.23670923, ...,  0.3047411 ,\n",
       "        -0.26397672, -0.14873419],\n",
       "       [ 1.35448126,  0.32427826,  0.29205514, ...,  0.8388287 ,\n",
       "         0.39832954,  0.42875609],\n",
       "       [ 0.11573113,  0.45130129, -0.23385326, ...,  0.19193008,\n",
       "        -0.56351448,  0.19011658]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.0 3.0 7.0 3.0 ... 3.0 1.0 3.0 1.0</div><input id='attrs-36b686cc-9430-4a3b-95e8-fef3df049a85' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-36b686cc-9430-4a3b-95e8-fef3df049a85' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-96f69051-a81c-467b-ab48-733a0827d892' class='xr-var-data-in' type='checkbox'><label for='data-96f69051-a81c-467b-ab48-733a0827d892' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3., 3., 7., ..., 3., 3., 3.],\n",
       "       [7., 1., 3., ..., 7., 3., 3.],\n",
       "       [3., 7., 3., ..., 1., 3., 3.],\n",
       "       [3., 3., 3., ..., 1., 3., 1.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0007679 0.0008184 ... 0.0004691</div><input id='attrs-f2186b59-81d4-4d3a-9667-1108bf1dcc6e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f2186b59-81d4-4d3a-9667-1108bf1dcc6e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-01cc5ca3-9cdb-4199-91a2-0790f2ba8368' class='xr-var-data-in' type='checkbox'><label for='data-01cc5ca3-9cdb-4199-91a2-0790f2ba8368' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00076794, 0.00081844, 0.0020097 , ..., 0.00077917, 0.00082774,\n",
       "        0.00119189],\n",
       "       [0.0021249 , 0.00052849, 0.00110096, ..., 0.00147241, 0.00079317,\n",
       "        0.00078654],\n",
       "       [0.00107116, 0.00210355, 0.00137885, ..., 0.00040726, 0.00080272,\n",
       "        0.00080483],\n",
       "       [0.00094488, 0.00098018, 0.00091505, ..., 0.00044845, 0.0009198 ,\n",
       "        0.00046908]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.141e+04 2.141e+04 ... 2.142e+04</div><input id='attrs-c527ba47-920c-4039-bd79-297f939f9602' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c527ba47-920c-4039-bd79-297f939f9602' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4836d7d2-771e-4fac-9b56-3b55c802974c' class='xr-var-data-in' type='checkbox'><label for='data-4836d7d2-771e-4fac-9b56-3b55c802974c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[21412.00898861, 21412.00993928, 21412.01092875, ...,\n",
       "        21415.93076222, 21415.93171033, 21416.00041352],\n",
       "       [21412.20207205, 21412.20442596, 21412.20518582, ...,\n",
       "        21416.22876577, 21416.23042347, 21416.23140097],\n",
       "       [21412.51639084, 21412.51767805, 21412.52005968, ...,\n",
       "        21416.60907957, 21416.60966792, 21416.61065475],\n",
       "       [21412.5215872 , 21412.522756  , 21412.52392098, ...,\n",
       "        21416.55488825, 21416.55553847, 21416.5566771 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0007684 0.000819 ... 0.0004692</div><input id='attrs-5a1e9986-d0c7-4321-a37e-ddd8fa8dfc61' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5a1e9986-d0c7-4321-a37e-ddd8fa8dfc61' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-877bb6c6-fd4d-4134-85dd-7c4b72273770' class='xr-var-data-in' type='checkbox'><label for='data-877bb6c6-fd4d-4134-85dd-7c4b72273770' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00076839, 0.00081902, 0.00201038, ..., 0.00077965, 0.00082834,\n",
       "        0.00119183],\n",
       "       [0.00212475, 0.00052906, 0.00110135, ..., 0.00147291, 0.00079358,\n",
       "        0.00078694],\n",
       "       [0.00107163, 0.00210423, 0.00137922, ..., 0.00040751, 0.00080329,\n",
       "        0.0008055 ],\n",
       "       [0.00094521, 0.00098049, 0.0009155 , ..., 0.00044901, 0.00092049,\n",
       "        0.00046918]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-cb099145-18e5-4fa6-b7dc-3749694c4bf2' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cb099145-18e5-4fa6-b7dc-3749694c4bf2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ed94f950-e374-4fcd-b70f-4fc531193e6f' class='xr-var-data-in' type='checkbox'><label for='data-ed94f950-e374-4fcd-b70f-4fc531193e6f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-fa261757-ee18-4a62-8cff-e420ac228441' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-fa261757-ee18-4a62-8cff-e420ac228441' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1965b830-f67a-44f4-a18a-bf27ad63698d' class='xr-var-data-in' type='checkbox'><label for='data-1965b830-f67a-44f4-a18a-bf27ad63698d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.074 1.074 1.074 ... 0.9051 0.9051</div><input id='attrs-bbf8b404-840f-4484-ad2d-7be851441598' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bbf8b404-840f-4484-ad2d-7be851441598' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-50274e5d-ea27-4f7d-b05f-da86c6141e6d' class='xr-var-data-in' type='checkbox'><label for='data-50274e5d-ea27-4f7d-b05f-da86c6141e6d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.0744276 , 1.0744276 , 1.0744276 , ..., 1.0744276 , 1.0744276 ,\n",
       "        1.0744276 ],\n",
       "       [1.0259337 , 1.0259337 , 1.0259337 , ..., 1.0259337 , 1.0259337 ,\n",
       "        1.0259337 ],\n",
       "       [0.92287501, 0.92287501, 0.92287501, ..., 0.92287501, 0.92287501,\n",
       "        0.92287501],\n",
       "       [0.90509986, 0.90509986, 0.90509986, ..., 0.90509986, 0.90509986,\n",
       "        0.90509986]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8999 0.8999 ... 0.9635 0.9635</div><input id='attrs-dc7510a8-e239-4de4-ac41-143dd9f4db9c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dc7510a8-e239-4de4-ac41-143dd9f4db9c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4ec57e08-8928-447f-a146-4a03c7a29e43' class='xr-var-data-in' type='checkbox'><label for='data-4ec57e08-8928-447f-a146-4a03c7a29e43' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.89989279, 0.89989279, 0.89989279, ..., 0.89989279, 0.89989279,\n",
       "        0.89989279],\n",
       "       [0.91274833, 0.91274833, 0.91274833, ..., 0.91274833, 0.91274833,\n",
       "        0.91274833],\n",
       "       [0.93330261, 0.93330261, 0.93330261, ..., 0.93330261, 0.93330261,\n",
       "        0.93330261],\n",
       "       [0.96353582, 0.96353582, 0.96353582, ..., 0.96353582, 0.96353582,\n",
       "        0.96353582]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 2 3 2 1 3 2 2 ... 2 2 2 1 2 1 2 1</div><input id='attrs-dbab4fa4-f658-4e93-85d2-6050984c8d5e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dbab4fa4-f658-4e93-85d2-6050984c8d5e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4b1fc66f-ee72-4e45-942a-67b12ff5280d' class='xr-var-data-in' type='checkbox'><label for='data-4b1fc66f-ee72-4e45-942a-67b12ff5280d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2, 2, 3, ..., 2, 2, 2],\n",
       "       [3, 1, 2, ..., 3, 2, 2],\n",
       "       [2, 3, 2, ..., 1, 2, 2],\n",
       "       [2, 2, 2, ..., 1, 2, 1]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-8a48e27c-6394-4718-92d1-ba1c2083ee32' class='xr-section-summary-in' type='checkbox'  ><label for='section-8a48e27c-6394-4718-92d1-ba1c2083ee32' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-66391bee-8686-4bf9-92fc-661dccd30a79' class='xr-index-data-in' type='checkbox'/><label for='index-66391bee-8686-4bf9-92fc-661dccd30a79' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-e93c6884-342e-4786-9168-bbb7c383644d' class='xr-index-data-in' type='checkbox'/><label for='index-e93c6884-342e-4786-9168-bbb7c383644d' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       990, 991, 992, 993, 994, 995, 996, 997, 998, 999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=1000))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9338abb3-dbf1-4c08-a952-a0df3553b919' class='xr-section-summary-in' type='checkbox'  checked><label for='section-9338abb3-dbf1-4c08-a952-a0df3553b919' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:41.541010+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>9.07543158531189</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_observed_dataccb8975c-5865-4c38-85d0-e1947c86fb4b\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_observed_dataccb8975c-5865-4c38-85d0-e1947c86fb4b\" class = \"xr-section-summary\">observed_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 9kB\n",
       "Dimensions:      (correct_obs: 543)\n",
       "Coordinates:\n",
       "  * correct_obs  (correct_obs) int64 4kB 0 1 2 3 4 5 ... 537 538 539 540 541 542\n",
       "Data variables:\n",
       "    correct      (correct_obs) int64 4kB 1 0 1 1 1 1 1 1 1 ... 1 0 1 1 1 1 1 1 0\n",
       "Attributes:\n",
       "    created_at:                  2024-12-05T07:07:41.552843+00:00\n",
       "    arviz_version:               0.19.0\n",
       "    inference_library:           pymc\n",
       "    inference_library_version:   5.16.2\n",
       "    modeling_interface:          bambi\n",
       "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-502d8060-3175-4b28-bfb7-ba794489abcd' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-502d8060-3175-4b28-bfb7-ba794489abcd' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>correct_obs</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-c96b3a57-cc08-4c1e-8373-736e9dd7df0c' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c96b3a57-cc08-4c1e-8373-736e9dd7df0c' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>correct_obs</span></div><div class='xr-var-dims'>(correct_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-16d35efd-3984-42dd-bebe-04888fefe196' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-16d35efd-3984-42dd-bebe-04888fefe196' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8e43df3e-2b39-4f1e-a00b-5baba1159126' class='xr-var-data-in' type='checkbox'><label for='data-8e43df3e-2b39-4f1e-a00b-5baba1159126' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-27ec994a-0331-451b-9c1f-0d73ac1772d1' class='xr-section-summary-in' type='checkbox'  checked><label for='section-27ec994a-0331-451b-9c1f-0d73ac1772d1' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>correct</span></div><div class='xr-var-dims'>(correct_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 0 1 1 1 1 1 1 ... 0 1 1 1 1 1 1 0</div><input id='attrs-3ff35d38-3a5f-4282-958c-8402597087a8' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3ff35d38-3a5f-4282-958c-8402597087a8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a30ecdfc-fe95-4e06-8220-e743ff4739f9' class='xr-var-data-in' type='checkbox'><label for='data-a30ecdfc-fe95-4e06-8220-e743ff4739f9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1,\n",
       "       1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1,\n",
       "       1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f00f2b2a-6a36-4f40-83a8-a9be40083f8a' class='xr-section-summary-in' type='checkbox'  ><label for='section-f00f2b2a-6a36-4f40-83a8-a9be40083f8a' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>correct_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-82aaadde-c9bf-45b5-b6d1-3f76e5d61381' class='xr-index-data-in' type='checkbox'/><label for='index-82aaadde-c9bf-45b5-b6d1-3f76e5d61381' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;correct_obs&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2728eb13-a5a2-4ade-8f09-f7f3f7438493' class='xr-section-summary-in' type='checkbox'  checked><label for='section-2728eb13-a5a2-4ade-8f09-f7f3f7438493' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:41.552843+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "              </ul>\n",
       "            </div>\n",
       "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-sections.group-sections {\n",
       "  grid-template-columns: auto;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2 {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       ".xr-wrap{width:700px!important;} </style>"
      ],
      "text/plain": [
       "Inference data with groups:\n",
       "\t> posterior\n",
       "\t> sample_stats\n",
       "\t> observed_data"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model_fitted"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": false,
    "id": "FB8AC9FB8785469E9E31AF19FA6E007E",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>sd</th>\n",
       "      <th>hdi_3%</th>\n",
       "      <th>hdi_97%</th>\n",
       "      <th>mcse_mean</th>\n",
       "      <th>mcse_sd</th>\n",
       "      <th>ess_bulk</th>\n",
       "      <th>ess_tail</th>\n",
       "      <th>r_hat</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>C(percentCoherence)[40]</th>\n",
       "      <td>1.762</td>\n",
       "      <td>0.267</td>\n",
       "      <td>1.246</td>\n",
       "      <td>2.240</td>\n",
       "      <td>0.006</td>\n",
       "      <td>0.004</td>\n",
       "      <td>2238.0</td>\n",
       "      <td>2261.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Intercept</th>\n",
       "      <td>0.785</td>\n",
       "      <td>0.134</td>\n",
       "      <td>0.538</td>\n",
       "      <td>1.031</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.002</td>\n",
       "      <td>3193.0</td>\n",
       "      <td>3091.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                          mean     sd  hdi_3%  hdi_97%  mcse_mean  mcse_sd  \\\n",
       "C(percentCoherence)[40]  1.762  0.267   1.246    2.240      0.006    0.004   \n",
       "Intercept                0.785  0.134   0.538    1.031      0.002    0.002   \n",
       "\n",
       "                         ess_bulk  ess_tail  r_hat  \n",
       "C(percentCoherence)[40]    2238.0    2261.0    1.0  \n",
       "Intercept                  3193.0    3091.0    1.0  "
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "fitted_parameters = az.summary(model_fitted)\n",
    "fitted_parameters"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "3D353CF1ACF543EC893051FBB1ED8A5E",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "由此可见，使用 **bambi** 建立的 logistic 回归模型得到的结果与我们使用 **PyMC** 建立的模型结果几乎一致：  \n",
    "\n",
    "- **C(percentCoherence)[40]** 的均值为 1.762，与 **beta_1** 的均值 1.766 非常接近。  \n",
    "- **Intercept** 的均值为 0.785，与 **beta_0** 的均值 0.784 差异微小。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "collapsed": false,
    "id": "C1483A49D2584E538927A18BBBABE262",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "p(coherence=10) = 0.687 p(coherence=40) = 0.927\n"
     ]
    }
   ],
   "source": [
    "p_coh10 = inv_logit( fitted_parameters.loc[\"Intercept\", \"mean\"])\n",
    "p_coh40 = inv_logit( \n",
    "    fitted_parameters.loc[\"Intercept\", \"mean\"] + \\\n",
    "        fitted_parameters.loc[\"C(percentCoherence)[40]\", \"mean\"]\n",
    ")\n",
    "\n",
    "print(f\"p(coherence=10) = {p_coh10:.3f}\", f\"p(coherence=40) = {p_coh40:.3f}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": false,
    "id": "413736E5E92940969D7B83A1D8DA883E",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div>\n",
       "              <div class='xr-header'>\n",
       "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
       "              </div>\n",
       "              <ul class=\"xr-sections group-sections\">\n",
       "              \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_posteriorb340b345-5b3b-4fab-80a9-2f9ee95d5cbb\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_posteriorb340b345-5b3b-4fab-80a9-2f9ee95d5cbb\" class = \"xr-section-summary\">posterior</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 17MB\n",
       "Dimensions:                  (chain: 4, draw: 1000, C(percentCoherence)_dim: 1,\n",
       "                              correct_obs: 543)\n",
       "Coordinates:\n",
       "  * chain                    (chain) int64 32B 0 1 2 3\n",
       "  * draw                     (draw) int64 8kB 0 1 2 3 4 ... 995 996 997 998 999\n",
       "  * C(percentCoherence)_dim  (C(percentCoherence)_dim) &lt;U2 8B &#x27;40&#x27;\n",
       "  * correct_obs              (correct_obs) int64 4kB 0 1 2 3 ... 539 540 541 542\n",
       "Data variables:\n",
       "    C(percentCoherence)      (chain, draw, C(percentCoherence)_dim) float64 32kB ...\n",
       "    Intercept                (chain, draw) float64 32kB 0.5589 0.9487 ... 0.7836\n",
       "    correct_mean             (chain, draw, correct_obs) float64 17MB 0.6362 ....\n",
       "Attributes:\n",
       "    created_at:                  2024-12-05T07:07:41.514887+00:00\n",
       "    arviz_version:               0.19.0\n",
       "    inference_library:           pymc\n",
       "    inference_library_version:   5.16.2\n",
       "    sampling_time:               9.07543158531189\n",
       "    tuning_steps:                1000\n",
       "    modeling_interface:          bambi\n",
       "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-93f027b5-6b7f-4540-8ee9-d8ca3cd401d6' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-93f027b5-6b7f-4540-8ee9-d8ca3cd401d6' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 1000</li><li><span class='xr-has-index'>C(percentCoherence)_dim</span>: 1</li><li><span class='xr-has-index'>correct_obs</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-8e3d1954-33a6-4172-a519-617a9276a8ed' class='xr-section-summary-in' type='checkbox'  checked><label for='section-8e3d1954-33a6-4172-a519-617a9276a8ed' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-79ef9a7b-0869-4008-93e3-6ed58dba762d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-79ef9a7b-0869-4008-93e3-6ed58dba762d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ec27bd1a-e54b-4850-9f79-55e59b04244a' class='xr-var-data-in' type='checkbox'><label for='data-ec27bd1a-e54b-4850-9f79-55e59b04244a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 995 996 997 998 999</div><input id='attrs-640c93af-31b2-48e9-ada6-c8b0d4428e7e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-640c93af-31b2-48e9-ada6-c8b0d4428e7e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-93bf7060-3677-4fc1-ad59-1a1080f5b196' class='xr-var-data-in' type='checkbox'><label for='data-93bf7060-3677-4fc1-ad59-1a1080f5b196' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 997, 998, 999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>C(percentCoherence)_dim</span></div><div class='xr-var-dims'>(C(percentCoherence)_dim)</div><div class='xr-var-dtype'>&lt;U2</div><div class='xr-var-preview xr-preview'>&#x27;40&#x27;</div><input id='attrs-9d689081-5ffd-43e2-a066-fc99553e8bf9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-9d689081-5ffd-43e2-a066-fc99553e8bf9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5e350ae9-1fdf-4bd4-ab04-cae351104b76' class='xr-var-data-in' type='checkbox'><label for='data-5e350ae9-1fdf-4bd4-ab04-cae351104b76' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([&#x27;40&#x27;], dtype=&#x27;&lt;U2&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>correct_obs</span></div><div class='xr-var-dims'>(correct_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-d4f65eda-2503-4788-90d6-4013f437f787' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d4f65eda-2503-4788-90d6-4013f437f787' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-be5641cf-0974-4a95-888c-55683f51400a' class='xr-var-data-in' type='checkbox'><label for='data-be5641cf-0974-4a95-888c-55683f51400a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-74725498-3439-4377-a68d-9edec2373d2c' class='xr-section-summary-in' type='checkbox'  checked><label for='section-74725498-3439-4377-a68d-9edec2373d2c' class='xr-section-summary' >Data variables: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>C(percentCoherence)</span></div><div class='xr-var-dims'>(chain, draw, C(percentCoherence)_dim)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.095 1.527 1.508 ... 1.278 1.22</div><input id='attrs-f927e4cd-fb0c-4787-8f6f-0bb47d5ee353' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f927e4cd-fb0c-4787-8f6f-0bb47d5ee353' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3063621f-fdd1-4a10-8d87-2bcd77715c45' class='xr-var-data-in' type='checkbox'><label for='data-3063621f-fdd1-4a10-8d87-2bcd77715c45' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[2.09485044],\n",
       "        [1.52670543],\n",
       "        [1.50846535],\n",
       "        ...,\n",
       "        [1.4392917 ],\n",
       "        [1.8426769 ],\n",
       "        [1.8426769 ]],\n",
       "\n",
       "       [[2.27334382],\n",
       "        [2.27334382],\n",
       "        [1.89643526],\n",
       "        ...,\n",
       "        [1.88599335],\n",
       "        [2.10912089],\n",
       "        [1.78041005]],\n",
       "\n",
       "       [[1.95418764],\n",
       "        [2.02519484],\n",
       "        [2.15939834],\n",
       "        ...,\n",
       "        [2.00631983],\n",
       "        [1.55018266],\n",
       "        [2.29408609]],\n",
       "\n",
       "       [[1.67027792],\n",
       "        [1.5587681 ],\n",
       "        [1.57459928],\n",
       "        ...,\n",
       "        [1.27865309],\n",
       "        [1.27843827],\n",
       "        [1.22038445]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>Intercept</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5589 0.9487 ... 0.8531 0.7836</div><input id='attrs-6cfe7c96-3a71-4d8c-92ed-a378127b32df' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6cfe7c96-3a71-4d8c-92ed-a378127b32df' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-42648099-806f-43c6-9198-942cf0f184e2' class='xr-var-data-in' type='checkbox'><label for='data-42648099-806f-43c6-9198-942cf0f184e2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.55894625, 0.94870701, 0.85657878, ..., 0.99067243, 0.73959972,\n",
       "        0.73959972],\n",
       "       [0.69014221, 0.69014221, 0.82096736, ..., 0.89318507, 0.68953898,\n",
       "        0.84619115],\n",
       "       [0.65369887, 0.61858906, 0.9312787 , ..., 0.53588785, 1.02279792,\n",
       "        0.59667896],\n",
       "       [0.8381225 , 0.66014793, 0.90385408, ..., 0.99242829, 0.85311797,\n",
       "        0.78359161]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>correct_mean</span></div><div class='xr-var-dims'>(chain, draw, correct_obs)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.6362 0.9342 ... 0.8812 0.6865</div><input id='attrs-f939f5e1-1820-4ed7-a1e2-b04d2d55941d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f939f5e1-1820-4ed7-a1e2-b04d2d55941d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3477eaf6-d18f-4591-a79b-b423664512eb' class='xr-var-data-in' type='checkbox'><label for='data-3477eaf6-d18f-4591-a79b-b423664512eb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.63620869, 0.93424461, 0.93424461, ..., 0.63620869,\n",
       "         0.93424461, 0.63620869],\n",
       "        [0.72085507, 0.92240006, 0.92240006, ..., 0.72085507,\n",
       "         0.92240006, 0.72085507],\n",
       "        [0.70194537, 0.91412261, 0.91412261, ..., 0.70194537,\n",
       "         0.91412261, 0.70194537],\n",
       "        ...,\n",
       "        [0.72922072, 0.91908387, 0.91908387, ..., 0.72922072,\n",
       "         0.91908387, 0.72922072],\n",
       "        [0.67690832, 0.92971219, 0.92971219, ..., 0.67690832,\n",
       "         0.92971219, 0.67690832],\n",
       "        [0.67690832, 0.92971219, 0.92971219, ..., 0.67690832,\n",
       "         0.92971219, 0.67690832]],\n",
       "\n",
       "       [[0.66599856, 0.95089702, 0.95089702, ..., 0.66599856,\n",
       "         0.95089702, 0.66599856],\n",
       "        [0.66599856, 0.95089702, 0.95089702, ..., 0.66599856,\n",
       "         0.95089702, 0.66599856],\n",
       "        [0.69444164, 0.93804576, 0.93804576, ..., 0.69444164,\n",
       "         0.93804576, 0.69444164],\n",
       "...\n",
       "        [0.63085531, 0.92704827, 0.92704827, ..., 0.63085531,\n",
       "         0.92704827, 0.63085531],\n",
       "        [0.73551724, 0.92910228, 0.92910228, ..., 0.73551724,\n",
       "         0.92910228, 0.73551724],\n",
       "        [0.64489614, 0.94738803, 0.94738803, ..., 0.64489614,\n",
       "         0.94738803, 0.64489614]],\n",
       "\n",
       "       [[0.69806965, 0.92472863, 0.92472863, ..., 0.69806965,\n",
       "         0.92472863, 0.69806965],\n",
       "        [0.65929362, 0.90193536, 0.90193536, ..., 0.65929362,\n",
       "         0.90193536, 0.65929362],\n",
       "        [0.71174087, 0.92261745, 0.92261745, ..., 0.71174087,\n",
       "         0.92261745, 0.71174087],\n",
       "        ...,\n",
       "        [0.72956729, 0.90645352, 0.90645352, ..., 0.72956729,\n",
       "         0.90645352, 0.72956729],\n",
       "        [0.7012208 , 0.89393266, 0.89393266, ..., 0.7012208 ,\n",
       "         0.89393266, 0.7012208 ],\n",
       "        [0.68645367, 0.88121391, 0.88121391, ..., 0.68645367,\n",
       "         0.88121391, 0.68645367]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2a19c788-3ac1-4576-b1d4-c8946e561486' class='xr-section-summary-in' type='checkbox'  ><label for='section-2a19c788-3ac1-4576-b1d4-c8946e561486' class='xr-section-summary' >Indexes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-ceb4635d-38de-4968-a61c-fcba0fe894bd' class='xr-index-data-in' type='checkbox'/><label for='index-ceb4635d-38de-4968-a61c-fcba0fe894bd' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-b5fd3fc7-48a5-43f8-91ed-1f0f027e921d' class='xr-index-data-in' type='checkbox'/><label for='index-b5fd3fc7-48a5-43f8-91ed-1f0f027e921d' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       990, 991, 992, 993, 994, 995, 996, 997, 998, 999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=1000))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>C(percentCoherence)_dim</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-7e8d35b6-2a0c-4fa9-9de5-107a70949dc3' class='xr-index-data-in' type='checkbox'/><label for='index-7e8d35b6-2a0c-4fa9-9de5-107a70949dc3' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([&#x27;40&#x27;], dtype=&#x27;object&#x27;, name=&#x27;C(percentCoherence)_dim&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>correct_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-e290695b-4e0a-428e-ba28-ced745f1522f' class='xr-index-data-in' type='checkbox'/><label for='index-e290695b-4e0a-428e-ba28-ced745f1522f' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;correct_obs&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b8dd82da-e81a-454d-9458-38b6946505c2' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b8dd82da-e81a-454d-9458-38b6946505c2' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:41.514887+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>9.07543158531189</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_posterior_predictive2a17f107-3178-46ba-b1d4-d8a21636cb24\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_posterior_predictive2a17f107-3178-46ba-b1d4-d8a21636cb24\" class = \"xr-section-summary\">posterior_predictive</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 17MB\n",
       "Dimensions:      (chain: 4, draw: 1000, correct_obs: 543)\n",
       "Coordinates:\n",
       "  * chain        (chain) int64 32B 0 1 2 3\n",
       "  * draw         (draw) int64 8kB 0 1 2 3 4 5 6 ... 993 994 995 996 997 998 999\n",
       "  * correct_obs  (correct_obs) int64 4kB 0 1 2 3 4 5 ... 537 538 539 540 541 542\n",
       "Data variables:\n",
       "    correct      (chain, draw, correct_obs) int64 17MB 1 1 1 0 0 1 ... 1 0 1 1 1\n",
       "Attributes:\n",
       "    modeling_interface:          bambi\n",
       "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-72a62f1d-634d-4e9f-88a5-b635ca19806e' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-72a62f1d-634d-4e9f-88a5-b635ca19806e' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 1000</li><li><span class='xr-has-index'>correct_obs</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-4ecc6585-3b50-4398-b145-16d5d61a4927' class='xr-section-summary-in' type='checkbox'  checked><label for='section-4ecc6585-3b50-4398-b145-16d5d61a4927' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-1b33e666-ebf9-4814-8597-fbb5697b53be' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-1b33e666-ebf9-4814-8597-fbb5697b53be' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1ddf18a0-7844-42a2-afed-0d8a0a148327' class='xr-var-data-in' type='checkbox'><label for='data-1ddf18a0-7844-42a2-afed-0d8a0a148327' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 995 996 997 998 999</div><input id='attrs-afdda94c-d98a-4a6d-9dd7-11cff4f6e6df' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-afdda94c-d98a-4a6d-9dd7-11cff4f6e6df' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c586d424-2826-4222-8e47-ef4adff84ca7' class='xr-var-data-in' type='checkbox'><label for='data-c586d424-2826-4222-8e47-ef4adff84ca7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 997, 998, 999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>correct_obs</span></div><div class='xr-var-dims'>(correct_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-99e4f344-061f-4c4a-9e62-76ea524159ad' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-99e4f344-061f-4c4a-9e62-76ea524159ad' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-117b3325-1bd7-40fc-89d7-b43ea0c8aa41' class='xr-var-data-in' type='checkbox'><label for='data-117b3325-1bd7-40fc-89d7-b43ea0c8aa41' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-dccae1da-3678-4f52-ad3a-5699ea83e41e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-dccae1da-3678-4f52-ad3a-5699ea83e41e' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>correct</span></div><div class='xr-var-dims'>(chain, draw, correct_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 1 1 0 0 1 0 1 ... 1 1 1 1 0 1 1 1</div><input id='attrs-0b9980e7-7b8f-4d21-b102-d0f548e063b1' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-0b9980e7-7b8f-4d21-b102-d0f548e063b1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-302ef8db-a738-4e8e-a891-f83726c7c90c' class='xr-var-data-in' type='checkbox'><label for='data-302ef8db-a738-4e8e-a891-f83726c7c90c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[1, 1, 1, ..., 1, 1, 1],\n",
       "        [0, 1, 1, ..., 1, 1, 0],\n",
       "        [1, 1, 0, ..., 1, 1, 1],\n",
       "        ...,\n",
       "        [0, 1, 1, ..., 0, 1, 1],\n",
       "        [1, 1, 1, ..., 0, 1, 1],\n",
       "        [0, 1, 1, ..., 0, 1, 0]],\n",
       "\n",
       "       [[1, 1, 1, ..., 1, 1, 1],\n",
       "        [0, 1, 1, ..., 1, 1, 1],\n",
       "        [1, 1, 1, ..., 0, 1, 1],\n",
       "        ...,\n",
       "        [1, 1, 1, ..., 1, 1, 1],\n",
       "        [1, 1, 1, ..., 0, 1, 1],\n",
       "        [1, 1, 1, ..., 0, 1, 0]],\n",
       "\n",
       "       [[0, 1, 1, ..., 0, 1, 1],\n",
       "        [0, 1, 1, ..., 1, 1, 1],\n",
       "        [0, 1, 1, ..., 1, 1, 1],\n",
       "        ...,\n",
       "        [1, 1, 1, ..., 0, 1, 0],\n",
       "        [0, 1, 1, ..., 1, 1, 1],\n",
       "        [1, 1, 1, ..., 1, 1, 0]],\n",
       "\n",
       "       [[1, 1, 1, ..., 1, 1, 0],\n",
       "        [1, 1, 1, ..., 1, 1, 0],\n",
       "        [1, 1, 1, ..., 1, 1, 1],\n",
       "        ...,\n",
       "        [0, 1, 1, ..., 1, 1, 1],\n",
       "        [1, 1, 1, ..., 0, 1, 0],\n",
       "        [1, 0, 0, ..., 1, 1, 1]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-0e5a1e5f-f147-4fb7-9791-5e58d0a40675' class='xr-section-summary-in' type='checkbox'  ><label for='section-0e5a1e5f-f147-4fb7-9791-5e58d0a40675' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-36c922d4-2241-4740-889b-5c3eea47fd52' class='xr-index-data-in' type='checkbox'/><label for='index-36c922d4-2241-4740-889b-5c3eea47fd52' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-a98335e8-0d8e-4f22-a85b-bb7800fc2955' class='xr-index-data-in' type='checkbox'/><label for='index-a98335e8-0d8e-4f22-a85b-bb7800fc2955' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       990, 991, 992, 993, 994, 995, 996, 997, 998, 999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=1000))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>correct_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-42b7a41b-87da-4a19-a809-130cf5973ba3' class='xr-index-data-in' type='checkbox'/><label for='index-42b7a41b-87da-4a19-a809-130cf5973ba3' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;correct_obs&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-404042f8-5e4e-4146-adb9-374d8e1b3745' class='xr-section-summary-in' type='checkbox'  checked><label for='section-404042f8-5e4e-4146-adb9-374d8e1b3745' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_sample_statsc005b0c8-0f38-4179-9885-dab69b53e678\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_sample_statsc005b0c8-0f38-4179-9885-dab69b53e678\" class = \"xr-section-summary\">sample_stats</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 496kB\n",
       "Dimensions:                (chain: 4, draw: 1000)\n",
       "Coordinates:\n",
       "  * chain                  (chain) int64 32B 0 1 2 3\n",
       "  * draw                   (draw) int64 8kB 0 1 2 3 4 5 ... 995 996 997 998 999\n",
       "Data variables: (12/17)\n",
       "    acceptance_rate        (chain, draw) float64 32kB 0.5868 0.9333 ... 0.8269\n",
       "    diverging              (chain, draw) bool 4kB False False ... False False\n",
       "    energy                 (chain, draw) float64 32kB 243.9 242.5 ... 243.6\n",
       "    energy_error           (chain, draw) float64 32kB 0.5966 -0.2811 ... 0.1901\n",
       "    index_in_trajectory    (chain, draw) int64 32kB 1 -1 -3 -2 1 ... -3 1 -1 -1\n",
       "    largest_eigval         (chain, draw) float64 32kB nan nan nan ... nan nan\n",
       "    ...                     ...\n",
       "    process_time_diff      (chain, draw) float64 32kB 0.0007684 ... 0.0004692\n",
       "    reached_max_treedepth  (chain, draw) bool 4kB False False ... False False\n",
       "    smallest_eigval        (chain, draw) float64 32kB nan nan nan ... nan nan\n",
       "    step_size              (chain, draw) float64 32kB 1.074 1.074 ... 0.9051\n",
       "    step_size_bar          (chain, draw) float64 32kB 0.8999 0.8999 ... 0.9635\n",
       "    tree_depth             (chain, draw) int64 32kB 2 2 3 2 1 3 ... 2 1 2 1 2 1\n",
       "Attributes:\n",
       "    created_at:                  2024-12-05T07:07:41.541010+00:00\n",
       "    arviz_version:               0.19.0\n",
       "    inference_library:           pymc\n",
       "    inference_library_version:   5.16.2\n",
       "    sampling_time:               9.07543158531189\n",
       "    tuning_steps:                1000\n",
       "    modeling_interface:          bambi\n",
       "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-3e048cf2-d119-4589-8546-cdd215f84a76' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-3e048cf2-d119-4589-8546-cdd215f84a76' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 1000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-a87d7760-74cd-49ce-b555-e611fcee04de' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a87d7760-74cd-49ce-b555-e611fcee04de' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-82d1fa85-b297-473b-b123-e4b76ea3e2a7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-82d1fa85-b297-473b-b123-e4b76ea3e2a7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c847ac7c-6115-42f9-9352-3f2ee82cb93f' class='xr-var-data-in' type='checkbox'><label for='data-c847ac7c-6115-42f9-9352-3f2ee82cb93f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 995 996 997 998 999</div><input id='attrs-c3375ef5-1572-4bc7-8b70-1d3c526719ea' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c3375ef5-1572-4bc7-8b70-1d3c526719ea' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2a9a57b7-97b7-4850-9937-9b1cd29f7c51' class='xr-var-data-in' type='checkbox'><label for='data-2a9a57b7-97b7-4850-9937-9b1cd29f7c51' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 997, 998, 999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-de9ad823-c588-4ac4-84ca-8c757d3cd8a6' class='xr-section-summary-in' type='checkbox'  ><label for='section-de9ad823-c588-4ac4-84ca-8c757d3cd8a6' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5868 0.9333 0.9418 ... 1.0 0.8269</div><input id='attrs-f334778a-c9e0-4952-99cb-eafe4338fbbc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f334778a-c9e0-4952-99cb-eafe4338fbbc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-622456d8-0be5-4a77-a774-8dd8b49f0e7c' class='xr-var-data-in' type='checkbox'><label for='data-622456d8-0be5-4a77-a774-8dd8b49f0e7c' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.58677678, 0.93334609, 0.94177475, ..., 0.82852062, 0.99321359,\n",
       "        0.36124276],\n",
       "       [0.80365969, 0.05145746, 0.93362813, ..., 0.83195937, 1.        ,\n",
       "        1.        ],\n",
       "       [0.46638066, 0.81778439, 0.77372526, ..., 0.43221648, 0.75933654,\n",
       "        0.78967243],\n",
       "       [0.96357156, 0.72360878, 1.        , ..., 0.82536457, 1.        ,\n",
       "        0.82686273]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-85e3e956-da1b-46ad-922f-cfb7049d9d43' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-85e3e956-da1b-46ad-922f-cfb7049d9d43' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6314c949-590b-4145-a818-98982ec7213e' class='xr-var-data-in' type='checkbox'><label for='data-6314c949-590b-4145-a818-98982ec7213e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>243.9 242.5 242.2 ... 243.0 243.6</div><input id='attrs-e73e0bba-b124-4c11-b7a1-edfaa5fae084' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e73e0bba-b124-4c11-b7a1-edfaa5fae084' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c63eef57-f48d-4959-93f4-859b344b840b' class='xr-var-data-in' type='checkbox'><label for='data-c63eef57-f48d-4959-93f4-859b344b840b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[243.91222342, 242.49815914, 242.18171471, ..., 242.5549396 ,\n",
       "        241.16366852, 242.70880957],\n",
       "       [243.21504166, 244.98616487, 242.5310653 , ..., 241.37973784,\n",
       "        241.52556676, 241.30277949],\n",
       "       [243.27239539, 242.0856872 , 244.14577353, ..., 242.16569912,\n",
       "        243.50236475, 243.76689222],\n",
       "       [241.752694  , 242.33428079, 241.76140111, ..., 242.65773266,\n",
       "        242.96898315, 243.63996241]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5966 -0.2811 ... -0.2561 0.1901</div><input id='attrs-aa5a6a72-ca05-4520-a3e3-b65084d3541c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-aa5a6a72-ca05-4520-a3e3-b65084d3541c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-deb0064d-6fee-4b0d-928b-bf0364ea14fc' class='xr-var-data-in' type='checkbox'><label for='data-deb0064d-6fee-4b0d-928b-bf0364ea14fc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.5965935 , -0.28111282, -0.2416552 , ...,  0.18983711,\n",
       "        -0.52453929,  0.        ],\n",
       "       [-0.02824713,  0.        , -0.23670923, ...,  0.3047411 ,\n",
       "        -0.11286848, -0.12352879],\n",
       "       [ 0.        ,  0.15223961,  0.29205514, ...,  0.8388287 ,\n",
       "         0.09084187, -0.23840771],\n",
       "       [-0.10502414,  0.23927709, -0.12595442, ...,  0.19193008,\n",
       "        -0.25608545,  0.19011658]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 -1 -3 -2 1 -1 ... -1 -3 1 -1 -1</div><input id='attrs-d4dcc23b-ac49-4542-871a-12523fa4514b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-d4dcc23b-ac49-4542-871a-12523fa4514b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-246672be-481a-4f97-9497-45fcda755740' class='xr-var-data-in' type='checkbox'><label for='data-246672be-481a-4f97-9497-45fcda755740' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 1, -1, -3, ..., -3, -3,  0],\n",
       "       [-2,  0, -2, ..., -5,  1, -2],\n",
       "       [ 0, -3,  2, ...,  1, -2, -2],\n",
       "       [-1,  2, -2, ...,  1, -1, -1]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-33eef061-ee47-4950-8a35-392a7371c64f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-33eef061-ee47-4950-8a35-392a7371c64f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-eca5885f-c674-4253-bb7b-d119c6f40a8e' class='xr-var-data-in' type='checkbox'><label for='data-eca5885f-c674-4253-bb7b-d119c6f40a8e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-242.0 -241.2 ... -242.3 -243.5</div><input id='attrs-ec95c88b-46cb-4f18-8eab-e9bfc11d2276' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ec95c88b-46cb-4f18-8eab-e9bfc11d2276' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bda28ab5-b295-47e2-b7f5-272204c7caab' class='xr-var-data-in' type='checkbox'><label for='data-bda28ab5-b295-47e2-b7f5-272204c7caab' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-241.99322296, -241.19781819, -240.83083213, ..., -241.68649032,\n",
       "        -240.49824882, -240.49824882],\n",
       "       [-242.32786779, -242.32786779, -240.80446227, ..., -241.34844532,\n",
       "        -241.33980315, -240.62963435],\n",
       "       [-240.94679789, -241.30740637, -243.71396739, ..., -242.1502334 ,\n",
       "        -242.00293787, -242.58132434],\n",
       "       [-240.50593548, -241.8324827 , -240.84463185, ..., -242.29389965,\n",
       "        -242.25121367, -243.50164965]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8163 -0.2811 ... -0.5635 0.1901</div><input id='attrs-ec5fbb5a-0aea-4223-b688-108ed350144f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ec5fbb5a-0aea-4223-b688-108ed350144f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ee216727-2899-4e2f-a40a-06b836380d55' class='xr-var-data-in' type='checkbox'><label for='data-ee216727-2899-4e2f-a40a-06b836380d55' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.81629248, -0.28111282,  0.25553993, ...,  0.30209842,\n",
       "        -0.52658381,  1.80131445],\n",
       "       [ 0.74299758,  2.9669998 , -0.23670923, ...,  0.3047411 ,\n",
       "        -0.26397672, -0.14873419],\n",
       "       [ 1.35448126,  0.32427826,  0.29205514, ...,  0.8388287 ,\n",
       "         0.39832954,  0.42875609],\n",
       "       [ 0.11573113,  0.45130129, -0.23385326, ...,  0.19193008,\n",
       "        -0.56351448,  0.19011658]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.0 3.0 7.0 3.0 ... 3.0 1.0 3.0 1.0</div><input id='attrs-f18a0b1b-c76b-402f-a921-730761633881' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f18a0b1b-c76b-402f-a921-730761633881' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-189bdf4a-6276-47f3-9946-6f84dfcde2a6' class='xr-var-data-in' type='checkbox'><label for='data-189bdf4a-6276-47f3-9946-6f84dfcde2a6' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3., 3., 7., ..., 3., 3., 3.],\n",
       "       [7., 1., 3., ..., 7., 3., 3.],\n",
       "       [3., 7., 3., ..., 1., 3., 3.],\n",
       "       [3., 3., 3., ..., 1., 3., 1.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0007679 0.0008184 ... 0.0004691</div><input id='attrs-689ebda1-f317-4160-9ad1-efa0d8321394' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-689ebda1-f317-4160-9ad1-efa0d8321394' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-36088256-de11-4ce3-80aa-b7198b3a18b9' class='xr-var-data-in' type='checkbox'><label for='data-36088256-de11-4ce3-80aa-b7198b3a18b9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00076794, 0.00081844, 0.0020097 , ..., 0.00077917, 0.00082774,\n",
       "        0.00119189],\n",
       "       [0.0021249 , 0.00052849, 0.00110096, ..., 0.00147241, 0.00079317,\n",
       "        0.00078654],\n",
       "       [0.00107116, 0.00210355, 0.00137885, ..., 0.00040726, 0.00080272,\n",
       "        0.00080483],\n",
       "       [0.00094488, 0.00098018, 0.00091505, ..., 0.00044845, 0.0009198 ,\n",
       "        0.00046908]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.141e+04 2.141e+04 ... 2.142e+04</div><input id='attrs-c8216c86-3625-4f09-961b-519a2c326f30' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c8216c86-3625-4f09-961b-519a2c326f30' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2b3d5dde-cf03-4c7b-90d9-d57ec5ebca31' class='xr-var-data-in' type='checkbox'><label for='data-2b3d5dde-cf03-4c7b-90d9-d57ec5ebca31' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[21412.00898861, 21412.00993928, 21412.01092875, ...,\n",
       "        21415.93076222, 21415.93171033, 21416.00041352],\n",
       "       [21412.20207205, 21412.20442596, 21412.20518582, ...,\n",
       "        21416.22876577, 21416.23042347, 21416.23140097],\n",
       "       [21412.51639084, 21412.51767805, 21412.52005968, ...,\n",
       "        21416.60907957, 21416.60966792, 21416.61065475],\n",
       "       [21412.5215872 , 21412.522756  , 21412.52392098, ...,\n",
       "        21416.55488825, 21416.55553847, 21416.5566771 ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0007684 0.000819 ... 0.0004692</div><input id='attrs-761946fe-5431-4463-bdf9-a342a5771c55' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-761946fe-5431-4463-bdf9-a342a5771c55' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9a6fb239-e4d6-49b2-8ea2-f8bd83dd993b' class='xr-var-data-in' type='checkbox'><label for='data-9a6fb239-e4d6-49b2-8ea2-f8bd83dd993b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00076839, 0.00081902, 0.00201038, ..., 0.00077965, 0.00082834,\n",
       "        0.00119183],\n",
       "       [0.00212475, 0.00052906, 0.00110135, ..., 0.00147291, 0.00079358,\n",
       "        0.00078694],\n",
       "       [0.00107163, 0.00210423, 0.00137922, ..., 0.00040751, 0.00080329,\n",
       "        0.0008055 ],\n",
       "       [0.00094521, 0.00098049, 0.0009155 , ..., 0.00044901, 0.00092049,\n",
       "        0.00046918]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-ee6b9e70-00e1-4ff3-890b-a4e8449063bf' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ee6b9e70-00e1-4ff3-890b-a4e8449063bf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f191fd5d-ca0a-4662-97ca-07e9985da584' class='xr-var-data-in' type='checkbox'><label for='data-f191fd5d-ca0a-4662-97ca-07e9985da584' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-7a2c5f14-e65b-4d2f-a5e6-da11e55846ec' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7a2c5f14-e65b-4d2f-a5e6-da11e55846ec' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d3889929-4446-40b3-b725-6c044bedd9b7' class='xr-var-data-in' type='checkbox'><label for='data-d3889929-4446-40b3-b725-6c044bedd9b7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.074 1.074 1.074 ... 0.9051 0.9051</div><input id='attrs-bfb789c6-204f-4692-80a8-d153475a15a5' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bfb789c6-204f-4692-80a8-d153475a15a5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7e3cbf40-80d3-4125-b547-a92aebdf34d2' class='xr-var-data-in' type='checkbox'><label for='data-7e3cbf40-80d3-4125-b547-a92aebdf34d2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.0744276 , 1.0744276 , 1.0744276 , ..., 1.0744276 , 1.0744276 ,\n",
       "        1.0744276 ],\n",
       "       [1.0259337 , 1.0259337 , 1.0259337 , ..., 1.0259337 , 1.0259337 ,\n",
       "        1.0259337 ],\n",
       "       [0.92287501, 0.92287501, 0.92287501, ..., 0.92287501, 0.92287501,\n",
       "        0.92287501],\n",
       "       [0.90509986, 0.90509986, 0.90509986, ..., 0.90509986, 0.90509986,\n",
       "        0.90509986]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8999 0.8999 ... 0.9635 0.9635</div><input id='attrs-11b54c0f-02ac-418b-9749-56d82656b42e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-11b54c0f-02ac-418b-9749-56d82656b42e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fb4b4ebe-d016-4944-98d5-b7b587597ff5' class='xr-var-data-in' type='checkbox'><label for='data-fb4b4ebe-d016-4944-98d5-b7b587597ff5' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.89989279, 0.89989279, 0.89989279, ..., 0.89989279, 0.89989279,\n",
       "        0.89989279],\n",
       "       [0.91274833, 0.91274833, 0.91274833, ..., 0.91274833, 0.91274833,\n",
       "        0.91274833],\n",
       "       [0.93330261, 0.93330261, 0.93330261, ..., 0.93330261, 0.93330261,\n",
       "        0.93330261],\n",
       "       [0.96353582, 0.96353582, 0.96353582, ..., 0.96353582, 0.96353582,\n",
       "        0.96353582]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 2 3 2 1 3 2 2 ... 2 2 2 1 2 1 2 1</div><input id='attrs-6c200f37-65ef-48d1-987e-8e80f7d16d51' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6c200f37-65ef-48d1-987e-8e80f7d16d51' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-22d79699-46f2-47ba-97a3-d1bda783c241' class='xr-var-data-in' type='checkbox'><label for='data-22d79699-46f2-47ba-97a3-d1bda783c241' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2, 2, 3, ..., 2, 2, 2],\n",
       "       [3, 1, 2, ..., 3, 2, 2],\n",
       "       [2, 3, 2, ..., 1, 2, 2],\n",
       "       [2, 2, 2, ..., 1, 2, 1]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9ca263f5-cef7-4f01-a274-1ed037c99316' class='xr-section-summary-in' type='checkbox'  ><label for='section-9ca263f5-cef7-4f01-a274-1ed037c99316' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-34cfc45c-af35-4e89-95d6-b0875f85a75d' class='xr-index-data-in' type='checkbox'/><label for='index-34cfc45c-af35-4e89-95d6-b0875f85a75d' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-327b130a-5ce6-4f89-8093-fd06935b4ab8' class='xr-index-data-in' type='checkbox'/><label for='index-327b130a-5ce6-4f89-8093-fd06935b4ab8' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       990, 991, 992, 993, 994, 995, 996, 997, 998, 999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=1000))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-5af13abb-56c6-45a2-b3ea-9c3298308b87' class='xr-section-summary-in' type='checkbox'  checked><label for='section-5af13abb-56c6-45a2-b3ea-9c3298308b87' class='xr-section-summary' >Attributes: <span>(8)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:41.541010+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>9.07543158531189</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_observed_data6fc25f69-d8f2-406a-8358-674d60c021d2\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_observed_data6fc25f69-d8f2-406a-8358-674d60c021d2\" class = \"xr-section-summary\">observed_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 9kB\n",
       "Dimensions:      (correct_obs: 543)\n",
       "Coordinates:\n",
       "  * correct_obs  (correct_obs) int64 4kB 0 1 2 3 4 5 ... 537 538 539 540 541 542\n",
       "Data variables:\n",
       "    correct      (correct_obs) int64 4kB 1 0 1 1 1 1 1 1 1 ... 1 0 1 1 1 1 1 1 0\n",
       "Attributes:\n",
       "    created_at:                  2024-12-05T07:07:41.552843+00:00\n",
       "    arviz_version:               0.19.0\n",
       "    inference_library:           pymc\n",
       "    inference_library_version:   5.16.2\n",
       "    modeling_interface:          bambi\n",
       "    modeling_interface_version:  0.13.0</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-441a98be-ec6f-43dc-85de-51dd528497c1' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-441a98be-ec6f-43dc-85de-51dd528497c1' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>correct_obs</span>: 543</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-1fdcd1a9-ba63-48f2-8e93-21e635f4f63a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-1fdcd1a9-ba63-48f2-8e93-21e635f4f63a' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>correct_obs</span></div><div class='xr-var-dims'>(correct_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 538 539 540 541 542</div><input id='attrs-8106b4d7-5337-42f4-a253-cf077bfce7fc' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-8106b4d7-5337-42f4-a253-cf077bfce7fc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-30407d10-3639-4b73-8265-2c047652a3cb' class='xr-var-data-in' type='checkbox'><label for='data-30407d10-3639-4b73-8265-2c047652a3cb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2, ..., 540, 541, 542])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-280851c0-853e-4b96-92fa-feb66c19d42d' class='xr-section-summary-in' type='checkbox'  checked><label for='section-280851c0-853e-4b96-92fa-feb66c19d42d' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>correct</span></div><div class='xr-var-dims'>(correct_obs)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>1 0 1 1 1 1 1 1 ... 0 1 1 1 1 1 1 0</div><input id='attrs-dbecabad-6e22-45dd-9c43-29302390e381' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-dbecabad-6e22-45dd-9c43-29302390e381' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7774bfd7-fbbe-4402-a8ea-b47799ef1dac' class='xr-var-data-in' type='checkbox'><label for='data-7774bfd7-fbbe-4402-a8ea-b47799ef1dac' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1,\n",
       "       1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1,\n",
       "       1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,\n",
       "       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "       1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,\n",
       "       1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "       1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-6a2a3874-5724-4048-a422-3034efe0cdbe' class='xr-section-summary-in' type='checkbox'  ><label for='section-6a2a3874-5724-4048-a422-3034efe0cdbe' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>correct_obs</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-d8207153-d3c7-4f82-ba25-3e747e3cc4b0' class='xr-index-data-in' type='checkbox'/><label for='index-d8207153-d3c7-4f82-ba25-3e747e3cc4b0' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       533, 534, 535, 536, 537, 538, 539, 540, 541, 542],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;correct_obs&#x27;, length=543))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b50c58db-caae-4dcd-b091-b5b8f4ace01a' class='xr-section-summary-in' type='checkbox'  checked><label for='section-b50c58db-caae-4dcd-b091-b5b8f4ace01a' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:07:41.552843+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>modeling_interface :</span></dt><dd>bambi</dd><dt><span>modeling_interface_version :</span></dt><dd>0.13.0</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "              </ul>\n",
       "            </div>\n",
       "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-sections.group-sections {\n",
       "  grid-template-columns: auto;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2 {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       ".xr-wrap{width:700px!important;} </style>"
      ],
      "text/plain": [
       "Inference data with groups:\n",
       "\t> posterior\n",
       "\t> posterior_predictive\n",
       "\t> sample_stats\n",
       "\t> observed_data"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "posterior_predictive = bambi_logit.predict(model_fitted, kind=\"pps\")\n",
    "model_fitted"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "collapsed": false,
    "id": "90B6692FF9DF468D8C5782681BEFD3F5",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/8CE9773414494AE38AAB9E9E4F6369D5/so0egvjtoh.png\">"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "az.plot_ppc(model_fitted, num_pp_samples=50)\n",
    "sns.despine()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "2D50E8F17EB240979E0BA705D3C677A3",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 练习  \n",
    "\n",
    "我们以一个新的例子进行练习对logistic模型的使用。  \n",
    "\n",
    "我们关注的研究问题：**个体依恋风格中的回避倾向**如何影响个体的**恋爱情况**？  \n",
    "\n",
    "* 成人依恋量表是一种常用于评估个体依恋风格的工具，包括亲密关系中的情感需求和行为模式。其中的回避分数反映了个体在恋爱关系中表现出的回避特征。这些特征通常表现为对亲密关系的回避、不愿意与伴侣建立过多的情感联系、保持独立性和独立思考的倾向。  \n",
    "\n",
    "* 研究假设：具有高回避分数的个体可能更倾向于避免或抵制与伴侣建立深入的情感联系，更难以建立恋爱关系  \n",
    "\n",
    "* 在此示例研究中，我们使用成人依恋量表中的分量表测得回避分数，并使用标准化后的回避分数进行后续分析。  \n",
    "\n",
    "> * 数据来源: Hu, C.-P. et al. (2018). Raw data from the Human Penguin Project. Open Science Framework. https://doi.org/10.17605/OSF.IO/H52D3  \n",
    "> * 回避分数量表来源：Fraley, R. C., Waller, N. G. & Brennan, K. A. An item response theory analysis of self-report measures of adult attachment. J. Pers. Soc. Psychol. 78, 350–365 (2000).  \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "518F7AB6D07440809DA6D1401206CF55",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "\n",
    "\n",
    "\n",
    "* 我们对以下关键步骤进行练习  \n",
    "    * 模型定义  \n",
    "    * 绘制后验预测回归线  \n",
    "    * 对新数据进行预测  \n",
    "    * 后验预测评估  \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "75C31A1B9BFF4CF184F7A82696B60F52",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": false,
    "id": "A141591003CB42D6A357338172E25FDB",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "# 导入 pymc 模型包，和 arviz 等分析工具 \n",
    "import pymc as pm\n",
    "import arviz as az\n",
    "import seaborn as sns\n",
    "import scipy.stats as st\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import xarray as xr\n",
    "import pandas as pd\n",
    "import ipywidgets\n",
    "\n",
    "# 忽略不必要的警告\n",
    "import warnings\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "collapsed": false,
    "id": "C71CBEACFDD148418D033F084D12A333",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "# 通过 pd.read_csv 加载数据 Data_Sum_HPP_Multi_Site_Share.csv\n",
    "try:\n",
    "  df_raw = pd.read_csv('/home/mw/input/bayes3797/Data_Sum_HPP_Multi_Site_Share.csv')\n",
    "except:\n",
    "  df_raw = pd.read_csv('data/Data_Sum_HPP_Multi_Site_Share.csv')\n",
    "\n",
    "# 选取清华站点的数据\n",
    "df = df_raw[df_raw[\"Site\"] == \"Tsinghua\"]\n",
    "\n",
    "# 选取本节课涉及的变量\n",
    "df = df[[\"romantic\", \"avoidance_r\", \"sex\"]]\n",
    "\n",
    "#重新编码，编码后的数据：1 = \"yes\"; 2 = \"no\"\n",
    "df[\"romantic\"] =  np.where(df['romantic'] == 2, 0, 1)\n",
    "\n",
    "#设置索引\n",
    "df[\"index\"] = range(len(df))\n",
    "df = df.set_index(\"index\")\n",
    "warnings.filterwarnings(\"ignore\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": false,
    "id": "5C973147A9FC49D6AC69F12456BD1894",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/1B91B874D0FD4019AFDB4CE51DF60C8A/so0egvxav2.png\">"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 对数据进行可视化\n",
    "# 绘制散点图\n",
    "sns.scatterplot(data=df,\n",
    "                x=\"avoidance_r\",\n",
    "                y=\"romantic\",\n",
    "                alpha=0.6)\n",
    "# 设置x轴标题\n",
    "plt.xlabel(\"avoidance\")\n",
    "# 设置y轴刻度\n",
    "plt.yticks([0,1],['no','yes'])\n",
    "sns.despine()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "D04EF80FFE3B467A8E0DB9BB26716FE9",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "## 模型定义  \n",
    "\n",
    "$$  \n",
    "\\begin{array}{lcrl}  \n",
    "\\text{data:} & \\hspace{.01in} & Y_i|\\beta_0,\\beta_1 & \\stackrel{ind}{\\sim} \\text{Bern}(\\pi_i) \\;\\; \\text{ with } \\;\\; \\pi_i = \\frac{e^{\\beta_0 + \\beta_1 X_{i1}}}{1 + e^{\\beta_0 + \\beta_1 X_{i1}}} \\\\  \n",
    "\\text{priors:} & & \\beta_{0}  &  \\sim N\\left(0, 0.5^2 \\right)  \\\\  \n",
    "               & & \\beta_1  & \\sim N\\left(0, 0.5^2 \\right)\\\\  \n",
    "\\end{array}  \n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false,
    "id": "67EAA69A28DC4542BB29015A4E7623BF",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [],
   "source": [
    "#===========================\n",
    "#     提示：参照之前的代码，对...中的内容进行修改\n",
    "#===========================\n",
    "\n",
    "with pm.Model() as log_model2:\n",
    "\n",
    "    # 添加数据，方便后续绘图\n",
    "    x = pm.MutableData(\"avoidance_r\", df['avoidance_r'])\n",
    "    y = pm.MutableData(\"romantic\", df['romantic'])\n",
    "\n",
    "    # 设置先验\n",
    "    # 通常我们会为截距和系数设置正态分布的先验\n",
    "    intercept = pm.Normal('...', mu=..., sigma=...)\n",
    "    coefficient = pm.Normal('...', mu=..., sigma=...)\n",
    "    \n",
    "    # 线性预测\n",
    "    linear_predictor = ...\n",
    "    \n",
    "    # 似然函数\n",
    "    # 使用逻辑函数将线性预测转换为概率\n",
    "    # 方法一：自行进行 logit link 转换\n",
    "    pi = pm.Deterministic('...', pm.math.invlogit(...))\n",
    "    likelihood = pm.Bernoulli('...', p=..., observed=...)\n",
    "    # 方法二：直接使用 logit_p 进行转换\n",
    "    # likelihood = pm.Bernoulli('likelihood', logit_p=linear_predictor, observed=y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "3F1629DDE8C74A3E905F8FC8028BC345",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### MCMC采样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": false,
    "id": "B6995CB8CDA848208DBD825778117670",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Sampling 4 chains, 0 divergences <span style=\"color: #008000; text-decoration-color: #008000\">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</span> <span style=\"color: #800080; text-decoration-color: #800080\">100%</span> <span style=\"color: #008080; text-decoration-color: #008080\">0:00:00</span> / <span style=\"color: #808000; text-decoration-color: #808000\">0:00:18</span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "Sampling 4 chains, 0 divergences \u001b[32m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[35m100%\u001b[0m \u001b[36m0:00:00\u001b[0m / \u001b[33m0:00:18\u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
      ],
      "text/plain": []
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Sampling 4 chains for 1_000 tune and 5_000 draw iterations (4_000 + 20_000 draws total) took 19 seconds.\n"
     ]
    }
   ],
   "source": [
    "#===========================\n",
    "#     注意！！！以下代码可能需要运行1-2分钟左右\n",
    "#===========================\n",
    "with log_model2:\n",
    "    # MCMC 近似后验分布\n",
    "    log_model2_trace = pm.sample(\n",
    "                                draws=5000,                   # 使用mcmc方法进行采样，draws为采样次数\n",
    "                                tune=1000,                    # tune为调整采样策略的次数，可以决定这些结果是否要被保留\n",
    "                                chains=4,                     # 链数\n",
    "                                discard_tuned_samples= True,  # tune的结果将在采样结束后被丢弃\n",
    "                                random_seed=84735)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "collapsed": false,
    "id": "550A880DBA8743F296B919A2274D9B0F",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "            <div>\n",
       "              <div class='xr-header'>\n",
       "                <div class=\"xr-obj-type\">arviz.InferenceData</div>\n",
       "              </div>\n",
       "              <ul class=\"xr-sections group-sections\">\n",
       "              \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_posterior91071d5b-35ff-4ee7-bc08-9b59f53292fa\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_posterior91071d5b-35ff-4ee7-bc08-9b59f53292fa\" class = \"xr-section-summary\">posterior</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 56MB\n",
       "Dimensions:  (chain: 4, draw: 5000, obs_id: 174)\n",
       "Coordinates:\n",
       "  * chain    (chain) int64 32B 0 1 2 3\n",
       "  * draw     (draw) int64 40kB 0 1 2 3 4 5 6 ... 4994 4995 4996 4997 4998 4999\n",
       "  * obs_id   (obs_id) int64 1kB 0 1 2 3 4 5 6 7 ... 167 168 169 170 171 172 173\n",
       "Data variables:\n",
       "    beta_0   (chain, draw) float64 160kB -0.8146 -0.6849 ... -0.4692 -0.4692\n",
       "    beta_1   (chain, draw) float64 160kB -0.06269 -0.152 ... -0.1888 -0.1888\n",
       "    mu       (chain, draw, obs_id) float64 28MB -0.8674 -0.7762 ... -0.3241\n",
       "    pi       (chain, draw, obs_id) float64 28MB 0.2958 0.3151 ... 0.4125 0.4197\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:08:09.106402+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2\n",
       "    sampling_time:              18.838109493255615\n",
       "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e6465a6f-f3fc-4ff4-8167-cc1220e40af9' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e6465a6f-f3fc-4ff4-8167-cc1220e40af9' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-a732d3d0-df6c-4e00-a29f-889c5f633e86' class='xr-section-summary-in' type='checkbox'  checked><label for='section-a732d3d0-df6c-4e00-a29f-889c5f633e86' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-eebe0b0d-d4a6-42ee-900c-0412dc8e112b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-eebe0b0d-d4a6-42ee-900c-0412dc8e112b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-200a8cc0-d3a8-44b5-b352-0debba56c59e' class='xr-var-data-in' type='checkbox'><label for='data-200a8cc0-d3a8-44b5-b352-0debba56c59e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-b3463cff-1c72-4653-9051-c7af88bcee99' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b3463cff-1c72-4653-9051-c7af88bcee99' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1762ca31-4feb-412d-b8b7-92be049c9ddd' class='xr-var-data-in' type='checkbox'><label for='data-1762ca31-4feb-412d-b8b7-92be049c9ddd' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-aa57e6ab-5d63-45b4-9426-3dd82c5b3c6d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-aa57e6ab-5d63-45b4-9426-3dd82c5b3c6d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-98000ead-10ce-45aa-bb2c-2c22b79b663f' class='xr-var-data-in' type='checkbox'><label for='data-98000ead-10ce-45aa-bb2c-2c22b79b663f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
       "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
       "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
       "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
       "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
       "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
       "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
       "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
       "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
       "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
       "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
       "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
       "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-aade2b3a-cca6-4c04-8873-9423e9966ac6' class='xr-section-summary-in' type='checkbox'  checked><label for='section-aade2b3a-cca6-4c04-8873-9423e9966ac6' class='xr-section-summary' >Data variables: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>beta_0</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.8146 -0.6849 ... -0.4692 -0.4692</div><input id='attrs-ed9f860a-f930-49e7-a04d-bd8d7df55441' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ed9f860a-f930-49e7-a04d-bd8d7df55441' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ab70465d-1365-419c-9e3d-fe2b2d72cb0a' class='xr-var-data-in' type='checkbox'><label for='data-ab70465d-1365-419c-9e3d-fe2b2d72cb0a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.8145693 , -0.68489222, -0.48518501, ..., -0.4515612 ,\n",
       "        -0.4005887 , -0.53480625],\n",
       "       [-0.36336872, -0.14181324, -0.74865918, ..., -0.42648482,\n",
       "        -0.50778888, -0.50372814],\n",
       "       [-0.31703342, -0.6517594 , -0.6517594 , ..., -0.65617658,\n",
       "        -0.31616026, -0.72058786],\n",
       "       [-0.43136423, -0.35512787, -0.46224556, ..., -0.19888927,\n",
       "        -0.46919501, -0.46919501]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>beta_1</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.06269 -0.152 ... -0.1888 -0.1888</div><input id='attrs-05acf886-3f02-44a7-9ef5-60b02c0de9b7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-05acf886-3f02-44a7-9ef5-60b02c0de9b7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6d774628-a99b-47ac-ac0f-8decdcce4caa' class='xr-var-data-in' type='checkbox'><label for='data-6d774628-a99b-47ac-ac0f-8decdcce4caa' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-0.06269475, -0.15197851, -0.15729474, ..., -0.3011382 ,\n",
       "         0.11434535, -0.29580854],\n",
       "       [-0.15082673,  0.06119222, -0.36142038, ..., -0.47242468,\n",
       "        -0.21935313, -0.06885318],\n",
       "       [-0.0886056 , -0.27813289, -0.27813289, ..., -0.37253077,\n",
       "         0.15640575, -0.32859346],\n",
       "       [-0.06351571, -0.31310975, -0.00170153, ..., -0.14374092,\n",
       "        -0.18880196, -0.18880196]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>mu</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-0.8674 -0.7762 ... -0.3536 -0.3241</div><input id='attrs-6e1146d5-4e85-4988-8f0a-c6fb3e44be3e' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-6e1146d5-4e85-4988-8f0a-c6fb3e44be3e' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9488a335-4bd6-4ece-a852-7440ec024764' class='xr-var-data-in' type='checkbox'><label for='data-9488a335-4bd6-4ece-a852-7440ec024764' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[-0.8674291 , -0.77617008, -0.73379982, ..., -0.81202184,\n",
       "         -0.77617008, -0.76639233],\n",
       "        [-0.8130298 , -0.59180858, -0.48909873, ..., -0.67871692,\n",
       "         -0.59180858, -0.56810631],\n",
       "        [-0.61780486, -0.38884529, -0.28254263, ..., -0.47879369,\n",
       "         -0.38884529, -0.3643139 ],\n",
       "        ...,\n",
       "        [-0.70545973, -0.26712038, -0.06360568, ..., -0.43932512,\n",
       "         -0.26712038, -0.22015545],\n",
       "        [-0.30418075, -0.47062283, -0.5478995 , ..., -0.40523487,\n",
       "         -0.47062283, -0.4884559 ],\n",
       "        [-0.7842112 , -0.35362974, -0.15371692, ..., -0.52278674,\n",
       "         -0.35362974, -0.30749601]],\n",
       "\n",
       "       [[-0.4905352 , -0.27099051, -0.16905905, ..., -0.35724021,\n",
       "         -0.27099051, -0.24746787],\n",
       "        [-0.09022026, -0.17929219, -0.22064701, ..., -0.14429965,\n",
       "         -0.17929219, -0.18883561],\n",
       "        [-1.05338341, -0.52729679, -0.28304229, ..., -0.73397367,\n",
       "         -0.52729679, -0.47093036],\n",
       "...\n",
       "        [-0.9702683 , -0.42800932, -0.17624621, ..., -0.64103963,\n",
       "         -0.42800932, -0.36991014],\n",
       "        [-0.18428993, -0.4119555 , -0.51765736, ..., -0.32251545,\n",
       "         -0.4119555 , -0.43634824],\n",
       "        [-0.99763473, -0.51933127, -0.2972618 , ..., -0.7072362 ,\n",
       "         -0.51933127, -0.46808447]],\n",
       "\n",
       "       [[-0.48491621, -0.39246219, -0.34953711, ..., -0.42878341,\n",
       "         -0.39246219, -0.3825564 ],\n",
       "        [-0.61911997, -0.16335473,  0.04825056, ..., -0.34240536,\n",
       "         -0.16335473, -0.11452274],\n",
       "        [-0.46368017, -0.46120341, -0.46005348, ..., -0.46217642,\n",
       "         -0.46120341, -0.46093804],\n",
       "        ...,\n",
       "        [-0.32008149, -0.11085098, -0.01370824, ..., -0.19304868,\n",
       "         -0.11085098, -0.08843342],\n",
       "        [-0.62837954, -0.35355778, -0.22596196, ..., -0.46152347,\n",
       "         -0.35355778, -0.32411259],\n",
       "        [-0.62837954, -0.35355778, -0.22596196, ..., -0.46152347,\n",
       "         -0.35355778, -0.32411259]]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>pi</span></div><div class='xr-var-dims'>(chain, draw, obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.2958 0.3151 ... 0.4125 0.4197</div><input id='attrs-bc9fd935-5255-4bdb-b71e-a54c534509fd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-bc9fd935-5255-4bdb-b71e-a54c534509fd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-78416b33-d92f-4ca5-91f8-94a8f1f8f48f' class='xr-var-data-in' type='checkbox'><label for='data-78416b33-d92f-4ca5-91f8-94a8f1f8f48f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[[0.29578953, 0.31514591, 0.32436144, ..., 0.30745982,\n",
       "         0.31514591, 0.31726003],\n",
       "        [0.30724524, 0.35621999, 0.38010591, ..., 0.33654773,\n",
       "         0.35621999, 0.3616739 ],\n",
       "        [0.35028087, 0.40399531, 0.42983053, ..., 0.38253702,\n",
       "         0.40399531, 0.40991569],\n",
       "        ...,\n",
       "        [0.33060285, 0.43361417, 0.48410394, ..., 0.39190179,\n",
       "         0.43361417, 0.44518237],\n",
       "        [0.42453578, 0.38446884, 0.36635188, ..., 0.40005526,\n",
       "         0.38446884, 0.38025738],\n",
       "        [0.31341299, 0.4125025 , 0.46164626, ..., 0.37220083,\n",
       "         0.4125025 , 0.42372605]],\n",
       "\n",
       "       [[0.3797675 , 0.43266394, 0.45783561, ..., 0.4116278 ,\n",
       "         0.43266394, 0.43844684],\n",
       "        [0.47746022, 0.45529664, 0.44506096, ..., 0.46398756,\n",
       "         0.45529664, 0.45293088],\n",
       "        [0.25857592, 0.37114759, 0.42970808, ..., 0.32432334,\n",
       "         0.37114759, 0.38439606],\n",
       "...\n",
       "        [0.27482703, 0.39460179, 0.45605215, ..., 0.34501157,\n",
       "         0.39460179, 0.40856274],\n",
       "        [0.45405747, 0.39844332, 0.37340018, ..., 0.42006283,\n",
       "         0.39844332, 0.39261145],\n",
       "        [0.26940671, 0.37300862, 0.426227  , ..., 0.33020983,\n",
       "         0.37300862, 0.38506973]],\n",
       "\n",
       "       [[0.38109191, 0.40312472, 0.41349467, ..., 0.39441688,\n",
       "         0.40312472, 0.40551047],\n",
       "        [0.34998163, 0.45925189, 0.5120603 , ..., 0.41522531,\n",
       "         0.45925189, 0.47140057],\n",
       "        [0.38611315, 0.38670038, 0.38697314, ..., 0.38646964,\n",
       "         0.38670038, 0.38676332],\n",
       "        ...,\n",
       "        [0.42065589, 0.4723156 , 0.49657299, ..., 0.45188716,\n",
       "         0.4723156 , 0.47790604],\n",
       "        [0.34787806, 0.41251994, 0.44374865, ..., 0.38662448,\n",
       "         0.41251994, 0.41967381],\n",
       "        [0.34787806, 0.41251994, 0.44374865, ..., 0.38662448,\n",
       "         0.41251994, 0.41967381]]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-7f725a90-17f3-4b67-ab2d-2191356a604e' class='xr-section-summary-in' type='checkbox'  ><label for='section-7f725a90-17f3-4b67-ab2d-2191356a604e' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-89865b38-e772-41bc-9357-b3252b69ceeb' class='xr-index-data-in' type='checkbox'/><label for='index-89865b38-e772-41bc-9357-b3252b69ceeb' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-43dade35-cf91-4790-8df0-0e511819b5ab' class='xr-index-data-in' type='checkbox'/><label for='index-43dade35-cf91-4790-8df0-0e511819b5ab' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([   0,    1,    2,    3,    4,    5,    6,    7,    8,    9,\n",
       "       ...\n",
       "       4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=5000))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>obs_id</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-7d2734f1-eb23-4620-a9d0-4789993b5cc7' class='xr-index-data-in' type='checkbox'/><label for='index-7d2734f1-eb23-4620-a9d0-4789993b5cc7' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       164, 165, 166, 167, 168, 169, 170, 171, 172, 173],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;obs_id&#x27;, length=174))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-ffb77922-c702-4855-84d8-e86a86cb0b92' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ffb77922-c702-4855-84d8-e86a86cb0b92' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:08:09.106402+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>18.838109493255615</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_sample_statsab2ad77f-5aa6-4647-a729-e752283945c4\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_sample_statsab2ad77f-5aa6-4647-a729-e752283945c4\" class = \"xr-section-summary\">sample_stats</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 2MB\n",
       "Dimensions:                (chain: 4, draw: 5000)\n",
       "Coordinates:\n",
       "  * chain                  (chain) int64 32B 0 1 2 3\n",
       "  * draw                   (draw) int64 40kB 0 1 2 3 4 ... 4996 4997 4998 4999\n",
       "Data variables: (12/17)\n",
       "    acceptance_rate        (chain, draw) float64 160kB 0.4835 1.0 ... 1.0 0.7393\n",
       "    diverging              (chain, draw) bool 20kB False False ... False False\n",
       "    energy                 (chain, draw) float64 160kB 118.4 117.7 ... 116.2\n",
       "    energy_error           (chain, draw) float64 160kB 0.919 -0.5669 ... 0.0\n",
       "    index_in_trajectory    (chain, draw) int64 160kB -1 -1 -1 -1 2 ... -1 3 -1 0\n",
       "    largest_eigval         (chain, draw) float64 160kB nan nan nan ... nan nan\n",
       "    ...                     ...\n",
       "    process_time_diff      (chain, draw) float64 160kB 0.0007557 ... 0.0006702\n",
       "    reached_max_treedepth  (chain, draw) bool 20kB False False ... False False\n",
       "    smallest_eigval        (chain, draw) float64 160kB nan nan nan ... nan nan\n",
       "    step_size              (chain, draw) float64 160kB 1.181 1.181 ... 1.039\n",
       "    step_size_bar          (chain, draw) float64 160kB 1.243 1.243 ... 1.16 1.16\n",
       "    tree_depth             (chain, draw) int64 160kB 2 1 2 2 2 2 ... 2 2 2 2 2 2\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:08:09.150347+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2\n",
       "    sampling_time:              18.838109493255615\n",
       "    tuning_steps:               1000</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-2558a831-fdac-4ce9-ba52-52a0d6afa446' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-2558a831-fdac-4ce9-ba52-52a0d6afa446' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>chain</span>: 4</li><li><span class='xr-has-index'>draw</span>: 5000</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-c4035533-342f-461a-b485-43bd96f6ced2' class='xr-section-summary-in' type='checkbox'  checked><label for='section-c4035533-342f-461a-b485-43bd96f6ced2' class='xr-section-summary' >Coordinates: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>chain</span></div><div class='xr-var-dims'>(chain)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3</div><input id='attrs-4000adc2-a40f-466e-ad26-a7946f9c76e4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4000adc2-a40f-466e-ad26-a7946f9c76e4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c59ab75a-3670-4fce-95da-2ff162363385' class='xr-var-data-in' type='checkbox'><label for='data-c59ab75a-3670-4fce-95da-2ff162363385' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 1, 2, 3])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>draw</span></div><div class='xr-var-dims'>(draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 ... 4996 4997 4998 4999</div><input id='attrs-5c66f135-b3a6-4e46-9e50-ed49ad9831f6' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5c66f135-b3a6-4e46-9e50-ed49ad9831f6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c49ec186-4c12-4d8b-8734-7d12ed19ac98' class='xr-var-data-in' type='checkbox'><label for='data-c49ec186-4c12-4d8b-8734-7d12ed19ac98' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([   0,    1,    2, ..., 4997, 4998, 4999])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-55f6bb9f-8ab1-42b0-a698-8d2b986d605b' class='xr-section-summary-in' type='checkbox'  ><label for='section-55f6bb9f-8ab1-42b0-a698-8d2b986d605b' class='xr-section-summary' >Data variables: <span>(17)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>acceptance_rate</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.4835 1.0 1.0 ... 1.0 0.7393</div><input id='attrs-4a333798-aa59-48d8-8596-4755052fbb9f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4a333798-aa59-48d8-8596-4755052fbb9f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-35f312d9-25a5-4148-bec0-95bb42e60af7' class='xr-var-data-in' type='checkbox'><label for='data-35f312d9-25a5-4148-bec0-95bb42e60af7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.48345839, 1.        , 1.        , ..., 0.78874586, 0.80747745,\n",
       "        0.89118496],\n",
       "       [0.99007365, 0.56151608, 1.        , ..., 0.62396129, 1.        ,\n",
       "        0.95680671],\n",
       "       [0.8206355 , 0.96192531, 0.81688048, ..., 0.99236423, 0.82688818,\n",
       "        0.92656315],\n",
       "       [0.95374675, 0.79650186, 0.99204497, ..., 0.47662515, 1.        ,\n",
       "        0.73933241]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>diverging</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-5e1c4c66-b394-4f3f-9760-57c15919fd28' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-5e1c4c66-b394-4f3f-9760-57c15919fd28' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3563f6c9-e23f-4f1c-89a3-770543530cdb' class='xr-var-data-in' type='checkbox'><label for='data-3563f6c9-e23f-4f1c-89a3-770543530cdb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>118.4 117.7 116.1 ... 116.6 116.2</div><input id='attrs-b7ee71ba-898f-4606-9a4f-18eb9d979cb3' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b7ee71ba-898f-4606-9a4f-18eb9d979cb3' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9af9775a-2ace-4f51-86d2-7e0ef85b2bc9' class='xr-var-data-in' type='checkbox'><label for='data-9af9775a-2ace-4f51-86d2-7e0ef85b2bc9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[118.43726662, 117.71626146, 116.10952833, ..., 116.74580903,\n",
       "        117.63696013, 117.66621547],\n",
       "       [116.09148738, 118.94618844, 118.68273435, ..., 117.84033694,\n",
       "        116.63795901, 115.67682795],\n",
       "       [116.52041726, 116.35076991, 117.02570707, ..., 118.87399921,\n",
       "        118.18925259, 118.97599493],\n",
       "       [115.89899914, 116.45796757, 116.66125457, ..., 120.25079346,\n",
       "        116.6300189 , 116.20951053]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.919 -0.5669 ... -0.5822 0.0</div><input id='attrs-08418bca-5cd7-40b9-ab9d-b2f798e48c53' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-08418bca-5cd7-40b9-ab9d-b2f798e48c53' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5b68df8b-c9e4-4101-8147-6244506688db' class='xr-var-data-in' type='checkbox'><label for='data-5b68df8b-c9e4-4101-8147-6244506688db' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.91895573, -0.56687459, -0.31912494, ...,  0.06210555,\n",
       "         0.40402376, -0.37947623],\n",
       "       [-0.1406788 ,  1.33737233, -0.42650396, ...,  0.80203627,\n",
       "        -0.940784  ,  0.04809164],\n",
       "       [ 0.18704023,  0.09744997,  0.        , ..., -0.37416599,\n",
       "         0.44126571, -0.3493382 ],\n",
       "       [ 0.00229261,  0.25216459, -0.11560866, ...,  0.21692852,\n",
       "        -0.58215104,  0.        ]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>index_in_trajectory</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>-1 -1 -1 -1 2 2 ... 1 2 -1 3 -1 0</div><input id='attrs-e379bd88-b667-498f-9a6c-317080193211' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-e379bd88-b667-498f-9a6c-317080193211' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4ded1cb8-3e31-4399-8bf0-f75716df2d5f' class='xr-var-data-in' type='checkbox'><label for='data-4ded1cb8-3e31-4399-8bf0-f75716df2d5f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-1, -1, -1, ...,  2, -2,  1],\n",
       "       [ 2,  1, -2, ..., -1, -1, -3],\n",
       "       [-2, -3,  0, ...,  2, -3, -2],\n",
       "       [-3,  1, -2, ...,  3, -1,  0]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>largest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-c791e808-4e63-4e72-b155-ebd63dadc8ad' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c791e808-4e63-4e72-b155-ebd63dadc8ad' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7d9c989b-c4d9-496a-8e6e-0c89261bb32d' class='xr-var-data-in' type='checkbox'><label for='data-7d9c989b-c4d9-496a-8e6e-0c89261bb32d' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>lp</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>-118.2 -116.4 ... -115.4 -115.4</div><input id='attrs-2d90a122-563a-4c1c-ada6-83f957e84e0d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2d90a122-563a-4c1c-ada6-83f957e84e0d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fcca298a-630b-4d88-9197-324ced486ecb' class='xr-var-data-in' type='checkbox'><label for='data-fcca298a-630b-4d88-9197-324ced486ecb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[-118.15253664, -116.35425205, -115.36722986, ..., -115.82195282,\n",
       "        -117.13966251, -115.83654955],\n",
       "       [-115.6396089 , -118.93663923, -117.74729069, ..., -117.55214596,\n",
       "        -115.46681503, -115.56562659],\n",
       "       [-116.01784463, -116.3266338 , -116.3266338 , ..., -116.97488517,\n",
       "        -118.13756599, -117.2168227 ],\n",
       "       [-115.60028125, -116.23580285, -115.91173239, ..., -117.08895024,\n",
       "        -115.38471762, -115.38471762]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>max_energy_error</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.9762 -0.5669 ... -0.5822 0.4145</div><input id='attrs-f5456f46-0260-4612-832d-54cc8bed5073' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f5456f46-0260-4612-832d-54cc8bed5073' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c47a3377-9728-4aaf-953b-adfe8dcc7e12' class='xr-var-data-in' type='checkbox'><label for='data-c47a3377-9728-4aaf-953b-adfe8dcc7e12' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[ 0.9761532 , -0.56687459, -0.31912494, ...,  0.41282585,\n",
       "         0.40402376,  0.39518582],\n",
       "       [-0.1406788 ,  1.33737233, -1.20508901, ...,  0.85927513,\n",
       "        -0.940784  ,  0.06722142],\n",
       "       [ 0.35421832, -0.17705815,  0.20226248, ..., -0.46595582,\n",
       "        -0.52617444, -0.3493382 ],\n",
       "       [ 0.07588791,  0.31262774, -0.15610962, ...,  1.50445159,\n",
       "        -0.58215104,  0.41452272]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>n_steps</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>3.0 1.0 3.0 3.0 ... 3.0 3.0 3.0 3.0</div><input id='attrs-595c2eed-f25b-4d12-85ec-9ff06c9c445d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-595c2eed-f25b-4d12-85ec-9ff06c9c445d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7f334852-57fc-4f82-9a0f-d6f17f50ae77' class='xr-var-data-in' type='checkbox'><label for='data-7f334852-57fc-4f82-9a0f-d6f17f50ae77' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[3., 1., 3., ..., 3., 3., 3.],\n",
       "       [3., 3., 3., ..., 3., 1., 3.],\n",
       "       [3., 3., 1., ..., 3., 3., 3.],\n",
       "       [3., 3., 3., ..., 3., 3., 3.]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0007553 0.0004867 ... 0.0006696</div><input id='attrs-c6418bfa-0dc7-4bf3-aa88-6ae51270608b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-c6418bfa-0dc7-4bf3-aa88-6ae51270608b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dbf3bdef-ae17-45f0-abc7-ae70bfa01692' class='xr-var-data-in' type='checkbox'><label for='data-dbf3bdef-ae17-45f0-abc7-ae70bfa01692' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00075534, 0.0004867 , 0.00078946, ..., 0.00063666, 0.00062908,\n",
       "        0.0005982 ],\n",
       "       [0.00101806, 0.00101296, 0.00099873, ..., 0.00057145, 0.00045507,\n",
       "        0.00095574],\n",
       "       [0.00089727, 0.00090175, 0.00045833, ..., 0.00056888, 0.0005192 ,\n",
       "        0.00053642],\n",
       "       [0.00057538, 0.00080095, 0.00063464, ..., 0.00065112, 0.00064202,\n",
       "        0.00066962]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>perf_counter_start</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>2.143e+04 2.143e+04 ... 2.144e+04</div><input id='attrs-195a4d08-7316-417d-9b90-1b22064f57ab' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-195a4d08-7316-417d-9b90-1b22064f57ab' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b6f0aadc-e7ef-4a6f-b8da-7f8cba358b51' class='xr-var-data-in' type='checkbox'><label for='data-b6f0aadc-e7ef-4a6f-b8da-7f8cba358b51' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[21428.4330347 , 21428.43396378, 21428.43463275, ...,\n",
       "        21441.91031855, 21441.91116725, 21441.91194165],\n",
       "       [21428.62843979, 21428.62968086, 21428.63092515, ...,\n",
       "        21442.21762539, 21442.22105834, 21442.22171776],\n",
       "       [21428.80668711, 21428.80781619, 21428.80893323, ...,\n",
       "        21442.90463574, 21442.9053453 , 21442.90604498],\n",
       "       [21429.93477819, 21430.00040324, 21430.00466955, ...,\n",
       "        21444.09028523, 21444.09112096, 21444.09192914]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>process_time_diff</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.0007557 0.0004873 ... 0.0006702</div><input id='attrs-808ae085-5ec2-490c-aa47-137bf40e7d3d' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-808ae085-5ec2-490c-aa47-137bf40e7d3d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-10864655-0ebf-41a1-b9b9-91440c80c7a3' class='xr-var-data-in' type='checkbox'><label for='data-10864655-0ebf-41a1-b9b9-91440c80c7a3' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[0.00075571, 0.00048729, 0.00078989, ..., 0.00063721, 0.00062937,\n",
       "        0.00059842],\n",
       "       [0.00101864, 0.00101334, 0.00099896, ..., 0.0005717 , 0.00045541,\n",
       "        0.00095622],\n",
       "       [0.00089758, 0.00090174, 0.00045885, ..., 0.0005694 , 0.00051935,\n",
       "        0.00053672],\n",
       "       [0.00057555, 0.00080071, 0.00063481, ..., 0.00065155, 0.00064253,\n",
       "        0.00067018]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>reached_max_treedepth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>bool</div><div class='xr-var-preview xr-preview'>False False False ... False False</div><input id='attrs-23b2de09-d7a1-4c26-8038-1ded11bad5c4' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-23b2de09-d7a1-4c26-8038-1ded11bad5c4' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-415f08a9-e025-4072-aca0-ed327c5e7cbb' class='xr-var-data-in' type='checkbox'><label for='data-415f08a9-e025-4072-aca0-ed327c5e7cbb' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False],\n",
       "       [False, False, False, ..., False, False, False]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>smallest_eigval</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>nan nan nan nan ... nan nan nan nan</div><input id='attrs-86ffc296-d227-4c6f-a965-233a8deb30fb' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-86ffc296-d227-4c6f-a965-233a8deb30fb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-bf40f019-f296-40d0-8338-9814a195b084' class='xr-var-data-in' type='checkbox'><label for='data-bf40f019-f296-40d0-8338-9814a195b084' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan],\n",
       "       [nan, nan, nan, ..., nan, nan, nan]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.181 1.181 1.181 ... 1.039 1.039</div><input id='attrs-4edd162c-86c7-4c46-af8c-4e43950e831b' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-4edd162c-86c7-4c46-af8c-4e43950e831b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7705d265-5a1c-4040-972b-4c0483f8aeaf' class='xr-var-data-in' type='checkbox'><label for='data-7705d265-5a1c-4040-972b-4c0483f8aeaf' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.18119476, 1.18119476, 1.18119476, ..., 1.18119476, 1.18119476,\n",
       "        1.18119476],\n",
       "       [0.95657423, 0.95657423, 0.95657423, ..., 0.95657423, 0.95657423,\n",
       "        0.95657423],\n",
       "       [1.1997429 , 1.1997429 , 1.1997429 , ..., 1.1997429 , 1.1997429 ,\n",
       "        1.1997429 ],\n",
       "       [1.03905335, 1.03905335, 1.03905335, ..., 1.03905335, 1.03905335,\n",
       "        1.03905335]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>step_size_bar</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.243 1.243 1.243 ... 1.16 1.16</div><input id='attrs-3de34021-95f6-49ad-8b82-8f89f48d39d7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-3de34021-95f6-49ad-8b82-8f89f48d39d7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-4cdf4f61-d3f9-4722-95dd-1971d90a6eda' class='xr-var-data-in' type='checkbox'><label for='data-4cdf4f61-d3f9-4722-95dd-1971d90a6eda' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[1.24341251, 1.24341251, 1.24341251, ..., 1.24341251, 1.24341251,\n",
       "        1.24341251],\n",
       "       [1.14507487, 1.14507487, 1.14507487, ..., 1.14507487, 1.14507487,\n",
       "        1.14507487],\n",
       "       [1.12152271, 1.12152271, 1.12152271, ..., 1.12152271, 1.12152271,\n",
       "        1.12152271],\n",
       "       [1.15967085, 1.15967085, 1.15967085, ..., 1.15967085, 1.15967085,\n",
       "        1.15967085]])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>tree_depth</span></div><div class='xr-var-dims'>(chain, draw)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>2 1 2 2 2 2 2 1 ... 1 1 2 2 2 2 2 2</div><input id='attrs-b6e7b4e9-4cad-4fcb-9096-f40e770a64d7' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-b6e7b4e9-4cad-4fcb-9096-f40e770a64d7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-0997a34b-99de-490e-86c1-b5be54c9b02e' class='xr-var-data-in' type='checkbox'><label for='data-0997a34b-99de-490e-86c1-b5be54c9b02e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([[2, 1, 2, ..., 2, 2, 2],\n",
       "       [2, 2, 2, ..., 2, 1, 2],\n",
       "       [2, 2, 1, ..., 2, 2, 2],\n",
       "       [2, 2, 2, ..., 2, 2, 2]])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e0ca1548-50e4-4e7c-b408-94f331c145e0' class='xr-section-summary-in' type='checkbox'  ><label for='section-e0ca1548-50e4-4e7c-b408-94f331c145e0' class='xr-section-summary' >Indexes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>chain</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-bd842a60-ec62-4a50-83fc-8100ac115c07' class='xr-index-data-in' type='checkbox'/><label for='index-bd842a60-ec62-4a50-83fc-8100ac115c07' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0, 1, 2, 3], dtype=&#x27;int64&#x27;, name=&#x27;chain&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>draw</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-5e757feb-f4a5-4b86-9af2-8764debded0c' class='xr-index-data-in' type='checkbox'/><label for='index-5e757feb-f4a5-4b86-9af2-8764debded0c' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([   0,    1,    2,    3,    4,    5,    6,    7,    8,    9,\n",
       "       ...\n",
       "       4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;draw&#x27;, length=5000))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-77dd0c02-c289-4431-a9e9-26bb51f47e43' class='xr-section-summary-in' type='checkbox'  checked><label for='section-77dd0c02-c289-4431-a9e9-26bb51f47e43' class='xr-section-summary' >Attributes: <span>(6)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:08:09.150347+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd><dt><span>sampling_time :</span></dt><dd>18.838109493255615</dd><dt><span>tuning_steps :</span></dt><dd>1000</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_observed_data1071f657-c376-43bd-940d-01fa0fd5e3a9\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_observed_data1071f657-c376-43bd-940d-01fa0fd5e3a9\" class = \"xr-section-summary\">observed_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 3kB\n",
       "Dimensions:  (obs_id: 174)\n",
       "Coordinates:\n",
       "  * obs_id   (obs_id) int64 1kB 0 1 2 3 4 5 6 7 ... 167 168 169 170 171 172 173\n",
       "Data variables:\n",
       "    y_est    (obs_id) int64 1kB 0 0 0 0 1 1 0 1 0 1 1 ... 1 1 0 0 0 0 0 0 0 0 1\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:08:09.162295+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-ac4c119a-80ad-45a0-94aa-dc2f86bf7c02' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ac4c119a-80ad-45a0-94aa-dc2f86bf7c02' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-f3df49ab-4612-4dce-ba91-71348077b628' class='xr-section-summary-in' type='checkbox'  checked><label for='section-f3df49ab-4612-4dce-ba91-71348077b628' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-82c90378-642e-43f2-bbab-1b7df3953f01' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-82c90378-642e-43f2-bbab-1b7df3953f01' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ae21900d-c8cd-4b06-be28-42d51194c356' class='xr-var-data-in' type='checkbox'><label for='data-ae21900d-c8cd-4b06-be28-42d51194c356' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
       "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
       "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
       "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
       "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
       "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
       "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
       "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
       "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
       "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
       "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
       "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
       "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-eafa2781-8e0d-4dfc-b3cc-85b1768ca593' class='xr-section-summary-in' type='checkbox'  checked><label for='section-eafa2781-8e0d-4dfc-b3cc-85b1768ca593' class='xr-section-summary' >Data variables: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>y_est</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-ddf8663c-e317-46c2-b1ed-f840576b5573' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-ddf8663c-e317-46c2-b1ed-f840576b5573' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b2e3ed72-ca41-481e-b257-f014367524ed' class='xr-var-data-in' type='checkbox'><label for='data-b2e3ed72-ca41-481e-b257-f014367524ed' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
       "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
       "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
       "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
       "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
       "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
       "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d3df8053-4441-4192-b891-f54f521efda7' class='xr-section-summary-in' type='checkbox'  ><label for='section-d3df8053-4441-4192-b891-f54f521efda7' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>obs_id</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-4a148eb3-aa44-47f0-b4bc-804ccbe65c3d' class='xr-index-data-in' type='checkbox'/><label for='index-4a148eb3-aa44-47f0-b4bc-804ccbe65c3d' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       164, 165, 166, 167, 168, 169, 170, 171, 172, 173],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;obs_id&#x27;, length=174))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e25d429d-2cb5-4b13-885f-7361e5fb732b' class='xr-section-summary-in' type='checkbox'  checked><label for='section-e25d429d-2cb5-4b13-885f-7361e5fb732b' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:08:09.162295+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "            <li class = \"xr-section-item\">\n",
       "                  <input id=\"idata_constant_data6b8124ed-7582-4be3-a491-80633e2356c1\" class=\"xr-section-summary-in\" type=\"checkbox\">\n",
       "                  <label for=\"idata_constant_data6b8124ed-7582-4be3-a491-80633e2356c1\" class = \"xr-section-summary\">constant_data</label>\n",
       "                  <div class=\"xr-section-inline-details\"></div>\n",
       "                  <div class=\"xr-section-details\">\n",
       "                      <ul id=\"xr-dataset-coord-list\" class=\"xr-var-list\">\n",
       "                          <div style=\"padding-left:2rem;\"><div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
       "<defs>\n",
       "<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
       "<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
       "</symbol>\n",
       "<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
       "<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
       "<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
       "</symbol>\n",
       "</defs>\n",
       "</svg>\n",
       "<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "html[data-theme=dark],\n",
       "body[data-theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block !important;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-index-preview {\n",
       "  grid-column: 2 / 5;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data,\n",
       ".xr-index-data-in:checked ~ .xr-index-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-index-name div,\n",
       ".xr-index-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data,\n",
       ".xr-index-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2,\n",
       ".xr-no-icon {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       "</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 3kB\n",
       "Dimensions:    (obs_id: 174)\n",
       "Coordinates:\n",
       "  * obs_id     (obs_id) int64 1kB 0 1 2 3 4 5 6 ... 167 168 169 170 171 172 173\n",
       "Data variables:\n",
       "    avoidance  (obs_id) float64 1kB 0.8431 -0.6125 -1.288 ... -0.6125 -0.7684\n",
       "    y          (obs_id) int32 696B 0 0 0 0 1 1 0 1 0 1 1 ... 1 0 0 0 0 0 0 0 0 1\n",
       "Attributes:\n",
       "    created_at:                 2024-12-05T07:08:09.166896+00:00\n",
       "    arviz_version:              0.19.0\n",
       "    inference_library:          pymc\n",
       "    inference_library_version:  5.16.2</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-154a038b-6689-454f-9bf7-78788736a2cf' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-154a038b-6689-454f-9bf7-78788736a2cf' class='xr-section-summary'  title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>obs_id</span>: 174</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-ed663f64-cb69-4c67-8b3b-20949fe784a4' class='xr-section-summary-in' type='checkbox'  checked><label for='section-ed663f64-cb69-4c67-8b3b-20949fe784a4' class='xr-section-summary' >Coordinates: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>obs_id</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0 1 2 3 4 5 ... 169 170 171 172 173</div><input id='attrs-412ff8d4-3e59-4004-b35a-5255596c1ed0' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-412ff8d4-3e59-4004-b35a-5255596c1ed0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-020fa715-1f33-4fce-8893-9e6b3171ec0b' class='xr-var-data-in' type='checkbox'><label for='data-020fa715-1f33-4fce-8893-9e6b3171ec0b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,\n",
       "        14,  15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,\n",
       "        28,  29,  30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,\n",
       "        42,  43,  44,  45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,\n",
       "        56,  57,  58,  59,  60,  61,  62,  63,  64,  65,  66,  67,  68,  69,\n",
       "        70,  71,  72,  73,  74,  75,  76,  77,  78,  79,  80,  81,  82,  83,\n",
       "        84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,  96,  97,\n",
       "        98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,\n",
       "       112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
       "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,\n",
       "       140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,\n",
       "       154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,\n",
       "       168, 169, 170, 171, 172, 173])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-43f4bb6d-66a2-472e-93ca-79354e502cba' class='xr-section-summary-in' type='checkbox'  checked><label for='section-43f4bb6d-66a2-472e-93ca-79354e502cba' class='xr-section-summary' >Data variables: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>avoidance</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.8431 -0.6125 ... -0.6125 -0.7684</div><input id='attrs-37f7eb7c-02c8-4be8-8b5d-317cfcacaa18' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-37f7eb7c-02c8-4be8-8b5d-317cfcacaa18' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-99304f6c-a51a-4b34-a8b5-9bace9e1975f' class='xr-var-data-in' type='checkbox'><label for='data-99304f6c-a51a-4b34-a8b5-9bace9e1975f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([ 0.84312961, -0.61247899, -1.28829727,  0.47922746, -0.61247899,\n",
       "        1.46696187, -1.02836716, -0.76843705, -0.97638114, -0.30056286,\n",
       "        0.79114359,  0.79114359, -1.02836716, -0.04063275, -0.04063275,\n",
       "        0.84312961, -1.08035318, -1.13233921,  0.63518553,  0.37525542,\n",
       "        0.68717155, -0.04063275, -2.01610157, -1.96411555, -0.30056286,\n",
       "       -1.34028329,  1.93483607, -0.24857684,  0.73915757, -0.24857684,\n",
       "        0.79114359, -0.24857684, -0.35254888, -0.56049297,  2.87058445,\n",
       "       -0.30056286, -1.18432523,  0.47922746,  0.84312961, -1.54822738,\n",
       "        0.16731133,  1.10305972, -0.50850695,  0.06333929,  0.79114359,\n",
       "        1.36298983,  0.06333929, -0.35254888,  0.63518553,  0.11532531,\n",
       "       -1.65219942, -0.82042308, -0.82042308, -0.19659082, -0.30056286,\n",
       "        1.25901779,  1.0510737 , -0.56049297, -0.97638114, -1.91212953,\n",
       "        0.58319951,  0.21929736,  0.16731133,  0.42724144, -0.8724091 ,\n",
       "        0.84312961,  0.58319951,  0.53121348,  0.27128338,  0.79114359,\n",
       "        0.47922746, -1.34028329,  0.3232694 , -0.4045349 ,  1.88285005,\n",
       "       -0.92439512, -0.97638114, -0.76843705,  1.46696187, -0.35254888,\n",
       "       -0.82042308, -1.39226931,  0.84312961,  0.53121348, -0.66446501,\n",
       "        0.53121348,  0.84312961,  0.06333929, -0.8724091 , -1.49624136,\n",
       "       -0.8724091 , -0.4045349 ,  2.29873822, -0.35254888, -1.39226931,\n",
       "       -0.82042308,  0.79114359,  0.94710166,  0.79114359,  0.79114359,\n",
       "        2.09079413, -1.34028329, -1.70418544,  0.79114359, -0.1446048 ,\n",
       "       -0.19659082,  0.58319951,  1.10305972,  0.84312961,  0.27128338,\n",
       "       -1.13233921, -0.61247899,  0.16731133, -0.19659082, -0.30056286,\n",
       "        0.27128338,  0.11532531,  0.11532531,  0.79114359, -0.92439512,\n",
       "       -1.80815749,  0.37525542, -0.04063275,  1.15504574, -1.28829727,\n",
       "       -1.28829727, -1.08035318, -1.44425533, -0.30056286, -1.23631125,\n",
       "        0.94710166,  0.68717155,  0.01135327, -0.04063275,  0.79114359,\n",
       "       -0.04063275,  1.0510737 , -0.71645103,  0.3232694 ,  0.06333929,\n",
       "        0.79114359, -1.70418544, -0.1446048 ,  1.98682209,  0.79114359,\n",
       "        2.09079413, -1.91212953, -1.44425533,  0.63518553, -0.92439512,\n",
       "        0.68717155, -0.50850695, -1.28829727,  3.07852854, -0.09261877,\n",
       "        1.778878  , -0.35254888, -0.92439512,  0.53121348, -0.92439512,\n",
       "       -0.56049297, -0.4045349 ,  0.68717155,  2.29873822,  0.53121348,\n",
       "        1.0510737 ,  0.58319951,  1.31100381,  0.21929736,  0.16731133,\n",
       "        0.58319951, -0.04063275, -0.61247899, -0.76843705])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>y</span></div><div class='xr-var-dims'>(obs_id)</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>0 0 0 0 1 1 0 1 ... 0 0 0 0 0 0 0 1</div><input id='attrs-a70bedad-9b28-4a22-b1af-7e6d552cc32f' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-a70bedad-9b28-4a22-b1af-7e6d552cc32f' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-86cefa43-8d0d-4afa-9164-198e4fdb470e' class='xr-var-data-in' type='checkbox'><label for='data-86cefa43-8d0d-4afa-9164-198e4fdb470e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,\n",
       "       1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1,\n",
       "       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0,\n",
       "       1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0,\n",
       "       1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0,\n",
       "       1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1,\n",
       "       0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,\n",
       "       0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1],\n",
       "      dtype=int32)</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f50de5d7-704f-4a81-b7ea-57852dd72af8' class='xr-section-summary-in' type='checkbox'  ><label for='section-f50de5d7-704f-4a81-b7ea-57852dd72af8' class='xr-section-summary' >Indexes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>obs_id</div></div><div class='xr-index-preview'>PandasIndex</div><div></div><input id='index-65601162-3583-43ca-9014-4e9be56105f8' class='xr-index-data-in' type='checkbox'/><label for='index-65601162-3583-43ca-9014-4e9be56105f8' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,\n",
       "       ...\n",
       "       164, 165, 166, 167, 168, 169, 170, 171, 172, 173],\n",
       "      dtype=&#x27;int64&#x27;, name=&#x27;obs_id&#x27;, length=174))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-d6210b77-169f-4178-9913-87dd5c61904e' class='xr-section-summary-in' type='checkbox'  checked><label for='section-d6210b77-169f-4178-9913-87dd5c61904e' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>created_at :</span></dt><dd>2024-12-05T07:08:09.166896+00:00</dd><dt><span>arviz_version :</span></dt><dd>0.19.0</dd><dt><span>inference_library :</span></dt><dd>pymc</dd><dt><span>inference_library_version :</span></dt><dd>5.16.2</dd></dl></div></li></ul></div></div><br></div>\n",
       "                      </ul>\n",
       "                  </div>\n",
       "            </li>\n",
       "            \n",
       "              </ul>\n",
       "            </div>\n",
       "            <style> /* CSS stylesheet for displaying InferenceData objects in jupyterlab.\n",
       " *\n",
       " */\n",
       "\n",
       ":root {\n",
       "  --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
       "  --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
       "  --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
       "  --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
       "  --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
       "  --xr-background-color: var(--jp-layout-color0, white);\n",
       "  --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
       "  --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
       "}\n",
       "\n",
       "html[theme=dark],\n",
       "body.vscode-dark {\n",
       "  --xr-font-color0: rgba(255, 255, 255, 1);\n",
       "  --xr-font-color2: rgba(255, 255, 255, 0.54);\n",
       "  --xr-font-color3: rgba(255, 255, 255, 0.38);\n",
       "  --xr-border-color: #1F1F1F;\n",
       "  --xr-disabled-color: #515151;\n",
       "  --xr-background-color: #111111;\n",
       "  --xr-background-color-row-even: #111111;\n",
       "  --xr-background-color-row-odd: #313131;\n",
       "}\n",
       "\n",
       ".xr-wrap {\n",
       "  display: block;\n",
       "  min-width: 300px;\n",
       "  max-width: 700px;\n",
       "}\n",
       "\n",
       ".xr-text-repr-fallback {\n",
       "  /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-header {\n",
       "  padding-top: 6px;\n",
       "  padding-bottom: 6px;\n",
       "  margin-bottom: 4px;\n",
       "  border-bottom: solid 1px var(--xr-border-color);\n",
       "}\n",
       "\n",
       ".xr-header > div,\n",
       ".xr-header > ul {\n",
       "  display: inline;\n",
       "  margin-top: 0;\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-obj-type,\n",
       ".xr-array-name {\n",
       "  margin-left: 2px;\n",
       "  margin-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-obj-type {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-sections {\n",
       "  padding-left: 0 !important;\n",
       "  display: grid;\n",
       "  grid-template-columns: 150px auto auto 1fr 20px 20px;\n",
       "}\n",
       "\n",
       ".xr-sections.group-sections {\n",
       "  grid-template-columns: auto;\n",
       "}\n",
       "\n",
       ".xr-section-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-section-item input {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-item input + label {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label {\n",
       "  cursor: pointer;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-item input:enabled + label:hover {\n",
       "  color: var(--xr-font-color0);\n",
       "}\n",
       "\n",
       ".xr-section-summary {\n",
       "  grid-column: 1;\n",
       "  color: var(--xr-font-color2);\n",
       "  font-weight: 500;\n",
       "}\n",
       "\n",
       ".xr-section-summary > span {\n",
       "  display: inline-block;\n",
       "  padding-left: 0.5em;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label {\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in + label:before {\n",
       "  display: inline-block;\n",
       "  content: '►';\n",
       "  font-size: 11px;\n",
       "  width: 15px;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:disabled + label:before {\n",
       "  color: var(--xr-disabled-color);\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label:before {\n",
       "  content: '▼';\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked + label > span {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-section-summary,\n",
       ".xr-section-inline-details {\n",
       "  padding-top: 4px;\n",
       "  padding-bottom: 4px;\n",
       "}\n",
       "\n",
       ".xr-section-inline-details {\n",
       "  grid-column: 2 / -1;\n",
       "}\n",
       "\n",
       ".xr-section-details {\n",
       "  display: none;\n",
       "  grid-column: 1 / -1;\n",
       "  margin-bottom: 5px;\n",
       "}\n",
       "\n",
       ".xr-section-summary-in:checked ~ .xr-section-details {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-array-wrap {\n",
       "  grid-column: 1 / -1;\n",
       "  display: grid;\n",
       "  grid-template-columns: 20px auto;\n",
       "}\n",
       "\n",
       ".xr-array-wrap > label {\n",
       "  grid-column: 1;\n",
       "  vertical-align: top;\n",
       "}\n",
       "\n",
       ".xr-preview {\n",
       "  color: var(--xr-font-color3);\n",
       "}\n",
       "\n",
       ".xr-array-preview,\n",
       ".xr-array-data {\n",
       "  padding: 0 5px !important;\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-array-data,\n",
       ".xr-array-in:checked ~ .xr-array-preview {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       ".xr-array-in:checked ~ .xr-array-data,\n",
       ".xr-array-preview {\n",
       "  display: inline-block;\n",
       "}\n",
       "\n",
       ".xr-dim-list {\n",
       "  display: inline-block !important;\n",
       "  list-style: none;\n",
       "  padding: 0 !important;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list li {\n",
       "  display: inline-block;\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "}\n",
       "\n",
       ".xr-dim-list:before {\n",
       "  content: '(';\n",
       "}\n",
       "\n",
       ".xr-dim-list:after {\n",
       "  content: ')';\n",
       "}\n",
       "\n",
       ".xr-dim-list li:not(:last-child):after {\n",
       "  content: ',';\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-has-index {\n",
       "  font-weight: bold;\n",
       "}\n",
       "\n",
       ".xr-var-list,\n",
       ".xr-var-item {\n",
       "  display: contents;\n",
       "}\n",
       "\n",
       ".xr-var-item > div,\n",
       ".xr-var-item label,\n",
       ".xr-var-item > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-even);\n",
       "  margin-bottom: 0;\n",
       "}\n",
       "\n",
       ".xr-var-item > .xr-var-name:hover span {\n",
       "  padding-right: 5px;\n",
       "}\n",
       "\n",
       ".xr-var-list > li:nth-child(odd) > div,\n",
       ".xr-var-list > li:nth-child(odd) > label,\n",
       ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n",
       "  background-color: var(--xr-background-color-row-odd);\n",
       "}\n",
       "\n",
       ".xr-var-name {\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-var-dims {\n",
       "  grid-column: 2;\n",
       "}\n",
       "\n",
       ".xr-var-dtype {\n",
       "  grid-column: 3;\n",
       "  text-align: right;\n",
       "  color: var(--xr-font-color2);\n",
       "}\n",
       "\n",
       ".xr-var-preview {\n",
       "  grid-column: 4;\n",
       "}\n",
       "\n",
       ".xr-var-name,\n",
       ".xr-var-dims,\n",
       ".xr-var-dtype,\n",
       ".xr-preview,\n",
       ".xr-attrs dt {\n",
       "  white-space: nowrap;\n",
       "  overflow: hidden;\n",
       "  text-overflow: ellipsis;\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-var-name:hover,\n",
       ".xr-var-dims:hover,\n",
       ".xr-var-dtype:hover,\n",
       ".xr-attrs dt:hover {\n",
       "  overflow: visible;\n",
       "  width: auto;\n",
       "  z-index: 1;\n",
       "}\n",
       "\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  display: none;\n",
       "  background-color: var(--xr-background-color) !important;\n",
       "  padding-bottom: 5px !important;\n",
       "}\n",
       "\n",
       ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n",
       ".xr-var-data-in:checked ~ .xr-var-data {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       ".xr-var-data > table {\n",
       "  float: right;\n",
       "}\n",
       "\n",
       ".xr-var-name span,\n",
       ".xr-var-data,\n",
       ".xr-attrs {\n",
       "  padding-left: 25px !important;\n",
       "}\n",
       "\n",
       ".xr-attrs,\n",
       ".xr-var-attrs,\n",
       ".xr-var-data {\n",
       "  grid-column: 1 / -1;\n",
       "}\n",
       "\n",
       "dl.xr-attrs {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  display: grid;\n",
       "  grid-template-columns: 125px auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt,\n",
       ".xr-attrs dd {\n",
       "  padding: 0;\n",
       "  margin: 0;\n",
       "  float: left;\n",
       "  padding-right: 10px;\n",
       "  width: auto;\n",
       "}\n",
       "\n",
       ".xr-attrs dt {\n",
       "  font-weight: normal;\n",
       "  grid-column: 1;\n",
       "}\n",
       "\n",
       ".xr-attrs dt:hover span {\n",
       "  display: inline-block;\n",
       "  background: var(--xr-background-color);\n",
       "  padding-right: 10px;\n",
       "}\n",
       "\n",
       ".xr-attrs dd {\n",
       "  grid-column: 2;\n",
       "  white-space: pre-wrap;\n",
       "  word-break: break-all;\n",
       "}\n",
       "\n",
       ".xr-icon-database,\n",
       ".xr-icon-file-text2 {\n",
       "  display: inline-block;\n",
       "  vertical-align: middle;\n",
       "  width: 1em;\n",
       "  height: 1.5em !important;\n",
       "  stroke-width: 0;\n",
       "  stroke: currentColor;\n",
       "  fill: currentColor;\n",
       "}\n",
       ".xr-wrap{width:700px!important;} </style>"
      ],
      "text/plain": [
       "Inference data with groups:\n",
       "\t> posterior\n",
       "\t> sample_stats\n",
       "\t> observed_data\n",
       "\t> constant_data"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "log_model2_trace"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": false,
    "id": "BCEC9DF6C3B44580B8508459EED47835",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/BD3AD686816543EFBA04995CBF5934B4/so0ehmwptd.png\">"
      ],
      "text/plain": [
       "<Figure size 1500x800 with 4 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "az.plot_trace(...,\n",
    "              var_names=[\"...\",\"...\"],\n",
    "              figsize=(15,8),\n",
    "              compact=False)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "0F374BED24A04E71AA1D8BD870427576",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 绘制后验预测回归线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "collapsed": false,
    "id": "6B154C5F4DA7464EB5627C94C22ED1B9",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/2745AA8FBCD547BB88D99123DFE4AE9B/so0ehnb9ah.png\">"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "##---------------------------------------------------------------------------\n",
    "#      无需修改，直接运行即可\n",
    "#---------------------------------------------------------------------------\n",
    "\n",
    "#画出每个自变量对应的恋爱概率94%hdi值\n",
    "az.plot_hdi(\n",
    "    df.avoidance_r,\n",
    "    log_model2_trace.posterior.pi,\n",
    "    hdi_prob=0.95,\n",
    "    fill_kwargs={\"alpha\": 0.25, \"linewidth\": 0},\n",
    "    color=\"C1\"\n",
    ")\n",
    "#得到每个自变量对应的恋爱概率均值，并使用sns.lineplot连成一条光滑的曲线\n",
    "post_mean = log_model2_trace.posterior.pi.mean((\"chain\", \"draw\"))\n",
    "sns.lineplot(x = df.avoidance_r, \n",
    "             y= post_mean, \n",
    "             label=\"posterior mean\", \n",
    "             color=\"C1\")\n",
    "#绘制真实数据散点图\n",
    "sns.scatterplot(x = df.avoidance_r, \n",
    "                y= df.romantic,label=\"observed data\", \n",
    "                color='#C00000', \n",
    "                alpha=0.5)\n",
    "#设置图例位置\n",
    "plt.legend(loc=\"upper right\",\n",
    "           bbox_to_anchor=(1.5, 1),\n",
    "           fontsize=12)\n",
    "sns.despine()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "333B0BA2FF094A7297512EAF41674B55",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 对新数据进行预测&分类"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "6A1FAB5FC9E74D92A19DD898E5C02DBE",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "* 除了对当前数据结果做出解释，我们也可以使用当前的参数预测值，对新数据做出预测  \n",
    "\n",
    "* 比如，当回避分数位于一个标准差时，即 $X_{i1}=1$时，个体是处在恋爱情况还是单身情况  \n",
    "\n",
    "\n",
    "$$  \n",
    "Y | \\beta_0, \\beta_1 \\sim \\text{Bern}(\\pi) \\;\\; \\text{ with } \\;\\; \\log\\left( \\frac{\\pi}{1-\\pi}\\right) = \\beta_0 + \\beta_1 * 1  \n",
    "$$  \n",
    "\n",
    "* 我们使用`pm.set_data`传入新的数据，使用`pm.sample_posterior_predictive`对新数据生成后验预测值  \n",
    "    * 假设我们传入的数据是(X=1, Y=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "collapsed": false,
    "id": "E5950788BCDE4A74918E76349D96FD82",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"https://cdn.kesci.com/upload/rt/8B78C2E3521E45E1A0EF676005E7915C/so0ehnaygp.png\">"
      ],
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#===========================\n",
    "#     提示：参照之前的代码，对...中的内容进行修改\n",
    "#===========================\n",
    "\n",
    "odds = ...\n",
    "pi = ...\n",
    "Y_hat = ...\n",
    "\n",
    "# 统计其中0和1的个数，并除以总数，得到0和1对应的比例值\n",
    "y_pred_freq = np.bincount(Y_hat)/len(Y_hat)\n",
    "\n",
    "#绘制柱状图\n",
    "bars = plt.bar([0, 1], y_pred_freq, color=\"#70AD47\")\n",
    "\n",
    "#用于在柱状图上标明比例值\n",
    "for bar, freq in zip(bars, y_pred_freq):\n",
    "    plt.text(bar.get_x() + bar.get_width() / 2, bar.get_height(), f\"{freq:.2f}\", ha='center', va='bottom')\n",
    "\n",
    "#对刻度、标题、坐标轴标题进行设置\n",
    "plt.xticks([0, 1])\n",
    "plt.suptitle(\"Out-of-sample prediction(X=1)\")\n",
    "plt.xlabel(\"romantic\")\n",
    "plt.ylabel(\"proportion\")\n",
    "sns.despine()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "421EF1DDD065431D98FC8D541366A7A6",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "runtime": {
     "execution_status": null,
     "is_visible": false,
     "status": "default"
    },
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "source": [
    "### 后验预测评估"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "collapsed": false,
    "id": "B116E02F9D9C43A8B524AD37F7E543CE",
    "jupyter": {},
    "notebookId": "67523e944182b57cc8761175",
    "scrolled": false,
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": [],
    "trusted": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True Positive: 30\n",
      "False Positive: 72\n",
      "True Negative: 30\n",
      "False Negative: 69\n",
      "准确性: 0.29850746268656714\n",
      "敏感性: 0.30303030303030304\n",
      "特异性: 0.29411764705882354\n"
     ]
    }
   ],
   "source": [
    "##---------------------------------------------------------------------------\n",
    "#      提示：参照之前的代码与先验定义，对...中的内容进行修改\n",
    "#---------------------------------------------------------------------------\n",
    "\n",
    "# 定义计算指标函数\n",
    "def calculate_metrics(TP, FP, TN, FN):\n",
    "    # 计算准确性\n",
    "    accuracy = (TP + TN) / (TP + TN + FP + FN)\n",
    "\n",
    "    # 计算敏感性\n",
    "    sensitivity = TP / (TP + FN) if (TP + FN) != 0 else 0\n",
    "\n",
    "    # 计算特异性\n",
    "    specificity = TN / (TN + FP) if (TN + FP) != 0 else 0\n",
    "\n",
    "    return accuracy, sensitivity, specificity\n",
    "\n",
    "# 计算指标\n",
    "accuracy, sensitivity, specificity = calculate_metrics(...)\n",
    "\n",
    "# 打印结果\n",
    "print(f\"True Positive: {true_positive}\")\n",
    "print(f\"False Positive: {false_positive}\")\n",
    "print(f\"True Negative: {true_negative}\")\n",
    "print(f\"False Negative: {false_negative}\")\n",
    "print(f\"准确性: {accuracy}\")\n",
    "print(f\"敏感性: {sensitivity}\")\n",
    "print(f\"特异性: {specificity}\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
